2020-09-02 11:28:33 -06:00
|
|
|
name: Publish Sphinx Built Webpages to Github Pages
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
paths:
|
|
|
|
- 'docs/**'
|
|
|
|
|
|
|
|
jobs:
|
2020-09-02 11:32:35 -06:00
|
|
|
release:
|
|
|
|
name: Build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Setup Python
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: '3.8'
|
|
|
|
|
2020-09-02 16:14:31 -06:00
|
|
|
- name: Install pip
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
|
|
|
|
- name: Get pip cache dir
|
|
|
|
id: pip-cache
|
|
|
|
run : echo "::set-output name=dir::$(pip cache dir)"
|
|
|
|
|
|
|
|
- name: Cache dependencies
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: ${{ steps.pip-cache.outputs.dir }}
|
2020-09-02 16:20:39 -06:00
|
|
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/docs/requirements.txt') }}
|
2020-09-02 16:14:31 -06:00
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-pip-
|
|
|
|
|
2020-09-02 11:32:35 -06:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt install pandoc
|
2020-09-02 12:14:51 -06:00
|
|
|
pip install -r docs/requirements.txt
|
2020-09-02 11:57:54 -06:00
|
|
|
|
2020-09-02 12:17:42 -06:00
|
|
|
- name: Install ReadTheDocs theme
|
2020-09-02 11:57:54 -06:00
|
|
|
run: |
|
2020-09-02 12:17:42 -06:00
|
|
|
pip install sphinx_rtd_theme
|
2020-09-02 11:32:35 -06:00
|
|
|
|
|
|
|
- name: Build Sphinx documentation
|
|
|
|
run: |
|
2020-09-02 12:14:51 -06:00
|
|
|
cd docs
|
2020-09-02 11:32:35 -06:00
|
|
|
make html
|
|
|
|
|
|
|
|
- name: Deploy to gh-pages
|
2020-09-02 11:36:42 -06:00
|
|
|
uses: peaceiris/actions-gh-pages@v3
|
2020-09-02 11:32:35 -06:00
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
2020-09-02 13:19:00 -06:00
|
|
|
publish_dir: ./docs/build/html
|