added id-token: write to builyand deploy of sphinx doc #57
Workflow file for this run
This file contains 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: Build and Deploy | |
on: | |
push: | |
branches: | |
162-protect-deployment-to-github-pages | |
permissions: | |
id-token: write # Add this line to allow OIDC token access | |
jobs: | |
build: | |
# Specify runner + build & upload the static files as an artifact | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
- name: Install dependencies | |
run: | | |
pip install sphinx sphinx_rtd_theme myst_parser sphinxcontrib-mermaid | |
- name: Build static files | |
id: build | |
run: | | |
sphinx-build webcentral/doc/06_sphinx/source build/ | |
- name: Upload static files as artifact | |
id: deployment | |
uses: actions/upload-pages-artifact@v3 # or specific "vX.X.X" version tag for this action | |
with: | |
path: build/ | |
# Deployment job | |
deploy: | |
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 | |