Refactor image/stamp workflow #709
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: Sphinx build | |
on: | |
push: | |
branches: | |
- main | |
- releases/* | |
pull_request: | |
branches: | |
- main | |
- releases/* | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install sphinx and theme | |
run: "pip install sphinx sphinx_rtd_theme" | |
- name: Build HTML | |
run: "sphinx-build -W doc public" | |
- name: "Bypass jekyll on github pages" | |
run: "touch public/.nojekyll" | |
- name: Upload artifacts | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: public/ | |
publish: | |
needs: build | |
# Only manual publishing: | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | |
permissions: | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an | |
# appropriate source | |
# Deploy to the github-pages environment | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Publish to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |