-
Notifications
You must be signed in to change notification settings - Fork 14
48 lines (41 loc) · 1.18 KB
/
publish-docs.yml
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Build and publish documentation
on:
push:
branches:
- master
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: r-lib/actions/setup-pandoc@v1
- name: Checkout Source
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install .
pip install .[dev]
- name: Checkout gh-pages
uses: actions/checkout@v2
with:
ref: gh-pages
path: docs/_build
- name: Build docs
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')
run: sphinx-build docs docs/_build
- name: Publish Docs to gh-pages
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build
keep_files: true