Skip to content
39 changes: 39 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
on:
push:
branches:
- master
pull_request:
branches:
- "**"
jobs:
run:
runs-on: ubuntu-18.04
steps:
# - uses: docker://pandoc/latex:2.9
- uses: actions/checkout@master
- uses: actions/setup-python@v2
with:
python-version: '3.8' # Version range or exact version of a Python version to use, using semvers version range syntax.
architecture: 'x64' # (x64 or x86)
- run: |
# add dependencies based on the conf.py
pip install -r requirements.txt
- name: Build docs
run: |
# Turn warnings into errors; ensure .doctrees doesn't get deployed
sphinx-build -b html -WT --keep-going spec build/latest -d doctrees
touch build/.nojekyll
- uses: actions/upload-artifact@v2
if: ${{ github.event_name == 'pull_request'}}
with:
name: html
path: build/
if-no-files-found: error
- name: Deploy
if: ${{ github.ref == 'refs/heads/master'}}
uses: JamesIves/github-pages-deploy-action@master
env:
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BASE_BRANCH: master # The branch the action should deploy from.
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: build