-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (54 loc) · 1.47 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
54
55
56
57
58
59
60
61
62
63
64
65
66
name: docs
on:
push:
branches:
- 'main'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Check out github
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies and package
run: |
python -m pip install --upgrade pip wheel
python -m pip install --upgrade -r docs/requirements.txt
python -m pip install .
- name: Build docs
env:
SPHINXOPTS: "-v"
run: |
cd docs/
make clean
make html
- name: Check out github
uses: actions/checkout@v4
with:
path: docs/_build/pyt-fnft-docs
ref: gh-pages
- name: Commit html docs
run: |
cd docs/_build/
ls
rm -rf pyt-fnft-docs/*
cp -r html/. pyt-fnft-docs/
cd pyt-fnft-docs/
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .
git commit --amend -m "Rebuild docs"
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: gh-pages
directory: docs/_build/pyt-fnft-docs
force: true