-
-
Notifications
You must be signed in to change notification settings - Fork 21
53 lines (44 loc) · 1.19 KB
/
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
49
50
51
52
53
# This workflow builds the Data Morph documentation and publishes it using GitHub pages.
#
# Based on https://olgarithms.github.io/sphinx-tutorial/docs/8-automating-documentation-updates.html
#
# Author: Stefanie Molin
name: Deploy Docs
on:
push:
branches: [ "main" ]
paths:
- '.github/workflows/docs.yml'
- 'docs/**'
- 'src/**'
- '!src/data_morph/__main__.py'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
docs:
name: Build and deploy docs.
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
pip install '.[docs]'
- name: Sphinx build
run: |
git worktree add docs/_build/html gh-pages
cd docs
make html
- name: Deploy docs
uses: peaceiris/actions-gh-pages@v3
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html