Skip to content

Rebuild book and upload to GH pages #35

Rebuild book and upload to GH pages

Rebuild book and upload to GH pages #35

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 }}