Document platform authentication #4
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: Publish documentation | |
| on: | |
| workflow_dispatch: | |
| push: | |
| paths: | |
| - "docs/**" | |
| - "mkdocs.yml" | |
| pull_request: | |
| paths: | |
| - "docs/**" | |
| - "mkdocs.yml" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Configure GitHub Pages | |
| if: github.ref == 'refs/heads/prod' | |
| uses: actions/configure-pages@v5 | |
| - name: Setup python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.x | |
| - name: Install mkdocs and mkdocs dependencies | |
| run: pip install -r docs/requirements.txt | |
| - name: Generate site using mkdocs | |
| run: mkdocs build | |
| - name: Upload static files as artifact | |
| id: deployment | |
| if: github.ref == 'refs/heads/prod' | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: site/ | |
| deploy: | |
| if: github.ref == 'refs/heads/prod' | |
| permissions: | |
| contents: read | |
| pages: write # to deploy to Pages | |
| id-token: write # to verify the deployment originates from an appropriate source | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |