-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (36 loc) · 1.08 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
name: docs
# Build and deploy oups API documentation.
on:
push:
branches: [ main ]
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Python setup
- name: Set up Python environment
uses: actions/setup-python@v2
with:
python-version: "3.10"
# Install build dependencies
- name: Install build dependencies
run: python -m pip install --upgrade pip setuptools wheel poetry pre-commit
# Install extra docs dependencies
- name: Install extra docs dependencies
run: pip install numpydoc sphinx sphinx-rtd-theme
# Build docs
- name: Build docs
run: catchsegv sphinx-build docs/source docs/build
# Add nojeckyll
- name: Add nojeckyll
run: touch docs/build/.nojekyll
# Publish API docs
- name: Publish API docs
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: gh-pages
FOLDER: docs/build
SQUASH_HISTORY: false
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}