Publish API Documentation #15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish API Documentation | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - 'v*' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write | |
| jobs: | |
| deploy-docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Set up Rust | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - name: Install Dependencies | |
| run: | | |
| sudo apt-get update && sudo apt-get upgrade -y | |
| sudo apt-get install -y gcc curl pkg-config libssl-dev make | |
| - name: Generate Documentation | |
| run: | | |
| pip install uv && uv sync --extra dev | |
| source .venv/bin/activate && make docs | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./site | |
| publish_branch: gh-pages | |
| user_name: ${{ github.actor }} | |
| user_email: ${{ github.actor }}@users.noreply.github.com | |
| commit_message: "docs: Deploy documentation from ${{ github.sha }} by ${{ github.actor }}" |