Clear CodeQL high-severity alerts blocking releases (TASK-372/373) #21
Workflow file for this run
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: Docs | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| # Permissions required for GitHub Pages deployment | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # Only one Pages deployment at a time; do not cancel in-progress deployments | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| schematic-check: | |
| name: Schemdraw staleness guard | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install Schemdraw | |
| run: pip install -r requirements-schematic.txt | |
| - name: Regenerate circuit schematic SVGs | |
| run: | | |
| python scripts/generate-schematic.py --target esp32 | |
| python scripts/generate-schematic.py --target nrf52840 | |
| - name: Fail if any SVG is stale | |
| run: | | |
| if ! git diff --exit-code docs/builders/wiring/esp32/main-circuit.svg docs/builders/wiring/nrf52840/main-circuit.svg; then | |
| echo "" | |
| echo "Circuit schematic SVG is stale. Regenerate locally and commit:" | |
| echo " python scripts/generate-schematic.py --target esp32" | |
| echo " python scripts/generate-schematic.py --target nrf52840" | |
| exit 1 | |
| fi | |
| build-docs: | |
| name: Build API Documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install Doxygen | |
| run: sudo apt-get install -y doxygen | |
| - name: Generate API documentation | |
| run: doxygen Doxyfile | |
| - name: Upload documentation artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: api-docs-html | |
| path: docs/api/html | |
| retention-days: 30 | |
| - name: Setup GitHub Pages | |
| if: github.event_name != 'pull_request' | |
| uses: actions/configure-pages@v5 | |
| - name: Copy example config to simulator | |
| if: github.event_name != 'pull_request' | |
| run: cp data/profiles.json docs/simulator/example.json | |
| - name: Add simulator and tools to Pages artifact | |
| if: github.event_name != 'pull_request' | |
| run: | | |
| mkdir -p docs/api/html/simulator | |
| cp -r docs/simulator/. docs/api/html/simulator/ | |
| mkdir -p docs/api/html/tools/config-builder | |
| cp -r docs/tools/config-builder/. docs/api/html/tools/config-builder/ | |
| mkdir -p docs/api/html/tools/configuration-builder | |
| cp -r docs/tools/configuration-builder/. docs/api/html/tools/configuration-builder/ | |
| - name: Upload Pages artifact | |
| if: github.event_name != 'pull_request' | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: docs/api/html | |
| deploy-docs: | |
| name: Deploy to GitHub Pages | |
| if: github.event_name != 'pull_request' | |
| needs: build-docs | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |