-
Notifications
You must be signed in to change notification settings - Fork 11
65 lines (54 loc) · 1.64 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
name: docs
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
steps:
- name: Checkout github repo
uses: actions/checkout@v2
- name: Install poetry
run: pipx install poetry
- name: Install pandoc
run: sudo apt-get install pandoc
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
- name: Install FFTW
run: |
sudo apt-get install libfftw3-dev
- name: Install python packages
run: |
poetry install
- name: build docs
shell: bash -l {0}
run: |
cd docs
poetry run make html
if [ $? = 2 ]; then exit 1;fi
cd build/html
touch .nojekyll
- name: Commit documentation changes
run: |
git clone https://github.com/LSSTDESC/BlendingToolKit.git --branch gh-pages --single-branch gh-pages
cp -r docs/build/html/* gh-pages/docs/
cd gh-pages/docs
touch .nojekyll
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update documentation" -a || true
# The above command will fail if no changes were present, so we ignore that.
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: gh-pages
directory: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}