Repository navigation
docs(testing): Add fzf selection cookbook #516
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: [master] | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| id-token: write | |
| pull-requests: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| environment: docs | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.14"] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Filter changed file paths to outputs | |
| uses: dorny/paths-filter@v4 | |
| id: changes | |
| with: | |
| filters: | | |
| root_docs: | |
| - CHANGES | |
| - MIGRATION | |
| - README.* | |
| docs: | |
| - 'docs/**' | |
| - '.github/workflows/docs.yml' | |
| python_files: | |
| - 'src/libvt/**' | |
| - uv.lock | |
| - pyproject.toml | |
| - name: Should build | |
| if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' || steps.changes.outputs.docs == 'true' || steps.changes.outputs.root_docs == 'true' || steps.changes.outputs.python_files == 'true' | |
| run: echo "BUILD_DOCS=true" >> "$GITHUB_ENV" | |
| - name: Install uv | |
| if: env.BUILD_DOCS == 'true' | |
| uses: astral-sh/setup-uv@v10.2.0 | |
| with: | |
| version-file: .tool-versions | |
| enable-cache: true | |
| - name: Set up Python ${{ matrix.python-version }} | |
| if: env.BUILD_DOCS == 'true' | |
| uses: actions/setup-python@v7 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install just | |
| if: env.BUILD_DOCS == 'true' | |
| uses: extractions/setup-just@v4 | |
| - name: Install dependencies | |
| if: env.BUILD_DOCS == 'true' | |
| run: uv sync --all-groups | |
| - name: Cache sphinx fonts | |
| if: env.BUILD_DOCS == 'true' | |
| uses: actions/cache@v6 | |
| with: | |
| path: ~/.cache/sphinx-fonts | |
| key: sphinx-fonts-${{ hashFiles('docs/conf.py') }} | |
| restore-keys: | | |
| sphinx-fonts- | |
| - name: Build documentation | |
| if: env.BUILD_DOCS == 'true' | |
| working-directory: docs | |
| run: just sphinxopts="-W --keep-going" html | |
| - name: Configure AWS Credentials | |
| if: env.BUILD_DOCS == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/master' && vars.LIBVT_DOCS_DEPLOY == 'true' | |
| uses: aws-actions/configure-aws-credentials@v6 | |
| with: | |
| role-to-assume: ${{ secrets.LIBVT_DOCS_ROLE_ARN }} | |
| aws-region: us-east-1 | |
| - name: Push documentation to S3 | |
| if: env.BUILD_DOCS == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/master' && vars.LIBVT_DOCS_DEPLOY == 'true' | |
| run: | | |
| aws s3 sync docs/_build/html "s3://${{ secrets.LIBVT_DOCS_BUCKET }}" \ | |
| --delete --follow-symlinks | |
| - name: Invalidate CloudFront | |
| if: env.BUILD_DOCS == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/master' && vars.LIBVT_DOCS_DEPLOY == 'true' | |
| run: | | |
| aws cloudfront create-invalidation \ | |
| --distribution-id "${{ secrets.LIBVT_DOCS_DISTRIBUTION }}" \ | |
| --paths "/*" | |
| - name: Purge cache on Cloudflare | |
| if: env.BUILD_DOCS == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/master' && vars.LIBVT_DOCS_DEPLOY == 'true' | |
| uses: jakejarvis/cloudflare-purge-action@v0.3.0 | |
| env: | |
| CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }} | |
| CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }} |