test(magnifier): real-bar fill verification #31
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 | |
| # Build the API documentation with Doxygen and deploy to Cloudflare Pages. | |
| # | |
| # Required repository secrets: | |
| # CLOUDFLARE_API_TOKEN - token with "Cloudflare Pages: Edit" permission | |
| # CLOUDFLARE_ACCOUNT_ID - your CF account id | |
| # | |
| # Required repository variables (or hard-code below): | |
| # CF_PAGES_PROJECT - the Cloudflare Pages project name | |
| # (defaults to "pineforge-docs" if unset) | |
| on: | |
| push: | |
| branches: [main] | |
| tags: ["v*"] | |
| workflow_dispatch: {} | |
| permissions: | |
| contents: read | |
| deployments: write | |
| concurrency: | |
| group: docs-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| CF_PROJECT: ${{ vars.CF_PAGES_PROJECT || 'pineforge-docs' }} | |
| DEPLOY_BRANCH: ${{ github.ref_name }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # need tags for git describe in build.sh | |
| - name: Install doxygen 1.13 + graphviz | |
| env: | |
| DOXYGEN_VERSION: "1.13.2" | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends graphviz | |
| curl -sSL "https://www.doxygen.nl/files/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz" \ | |
| | sudo tar -xz -C /opt | |
| sudo ln -sf "/opt/doxygen-${DOXYGEN_VERSION}/bin/doxygen" /usr/local/bin/doxygen | |
| doxygen --version | |
| dot -V | |
| - name: Build site | |
| run: bash docs/build.sh | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: docs-html | |
| path: docs/site/html | |
| retention-days: 7 | |
| - name: Sanitize deploy branch name | |
| id: deploy | |
| run: | | |
| # CF Pages branch names: alphanumerics, dashes, underscores, slashes. | |
| SAFE="$(printf '%s' "$DEPLOY_BRANCH" | tr -c 'A-Za-z0-9._/-' '-')" | |
| echo "branch=$SAFE" >> "$GITHUB_OUTPUT" | |
| - name: Deploy to Cloudflare Pages | |
| if: github.event_name != 'pull_request' | |
| uses: cloudflare/wrangler-action@v3 | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| command: >- | |
| pages deploy docs/site/html | |
| --project-name=${{ env.CF_PROJECT }} | |
| --branch=${{ steps.deploy.outputs.branch }} | |
| --commit-dirty=true |