-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (37 loc) · 1.1 KB
/
main.yaml
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
name: Update package website
on: push
jobs:
build-and-delpoy:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Python
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: |
pip3 install -r requirements.txt
- name: Build documentation
run: |
sphinx-apidoc -o docs/source qop -T -f -M
cd docs
make html
- name: Commit changes
run: |
git clone https://github.com/s-fleck/qop.git --branch gh-pages --single-branch gh-pages
mv docs/build/html /tmp
rm -r *
mv /tmp/html/* .
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update documentation" -a || true
- name: Deploy
if: success()
uses: peaceiris/actions-gh-pages@v3
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: "."