-
Notifications
You must be signed in to change notification settings - Fork 6
58 lines (49 loc) · 1.34 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
name: Generate Docs
# This action should just run on content based pushed to the master branch
on:
push:
branches: ['master']
paths:
- 'doc/**'
- 'BPt/**'
# Run jobs
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v2
# Setup python for the runner
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
# Install needed dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[extra]
# Generate the docs
- name: Generate docs
run: |
sudo apt install pandoc
pip install sphinx==4.2.0
pip install numpydoc==1.1.0
pip install nbsphinx
pip install pydata_sphinx_theme==0.11.0
cd doc
python make.py clean
python make.py html
cd ../
# Next, we need to commit the new files into the repository
- name: Commit files
run: |
git config --local user.name "sahahn"
git add ./docs
git commit -m "Update HTML docs"
# Push the change
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
force: true