Docs Deploy Pages #9
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 Deploy Pages | |
| on: | |
| workflow_run: | |
| workflows: | |
| - Docs CI | |
| types: | |
| - completed | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: docs-pages | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| if: github.event.workflow_run.conclusion == 'success' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.workflow_run.head_sha }} | |
| - name: Configure GitHub Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install PyYAML multilingualprogramming | |
| - name: Validate multilingual docs metadata | |
| run: python scripts/validate_multilingual_docs.py --strict-freshness | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: "3.3" | |
| bundler-cache: true | |
| - name: Build Jekyll site | |
| run: bundle exec jekyll build --baseurl "/docs" | |
| - name: Check internal links | |
| run: python scripts/check_internal_links.py --site-dir _site --base-path /docs | |
| - name: Check Pages artifact | |
| run: python scripts/check_pages_artifact.py --site-dir _site --base-path /docs | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: _site | |
| deploy: | |
| needs: build | |
| 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 |