Rebuild book and upload to GH pages #35
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: "Update GitHub Pages" | |
# Name of this action (else will name after the commits) | |
run-name: Rebuild book and upload to GH pages | |
# Perform action upon pushes to the main branch | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
docs: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v3 | |
- name: Install dependencies | |
run: | | |
pip install sphinx sphinx_rtd_theme myst_parser | |
- name: Build HTML | |
uses: ammaraskar/sphinx-action@master | |
with: | |
# Builds using Makefile, with docs for book in current directory | |
docs-folder: "." | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
publish_branch: gh-pages | |
# Location of your index.html file to produce the book | |
publish_dir: _build/html/ | |
# Not a personal access token - GitHub Actions runner makes one | |
github_token: ${{ secrets.GITHUB_TOKEN }} |