Docs: update project.py. #2
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: Deploy docs to Cloudflare | |
| on: | |
| push: | |
| branches: [develop] | |
| pull_request: | |
| branches: [develop] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| deployments: write | |
| name: Deploy to Cloudflare Pages | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install OS dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -qq doxygen graphviz | |
| cd ${{ github.workspace }} | |
| sudo ./install_dependencies.sh | |
| - name: Set up Python venv | |
| uses: actions/setup-python@v5 | |
| with: { python-version: "3.13" } | |
| - name: Install Python dependencies | |
| run: | | |
| pip install -r docs/requirements.txt | |
| - name: Generate documentation | |
| run: | | |
| cd ${{ github.workspace }}/docs | |
| ./generate_docs.sh rebuild | |
| - name: Deploy to Cloudflare Worker | |
| uses: cloudflare/wrangler-action@v3 | |
| with: | |
| apiToken: ${{ secrets.CF_TOKEN }} | |
| accountId: ${{ secrets.CF_ACCOUNT }} | |
| wranglerVersion: "4" | |
| command: ${{ github.event_name == 'pull_request' && 'versions upload' || 'deploy' }} |