-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (32 loc) · 1.01 KB
/
update_gh_pages.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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 }}