-
Notifications
You must be signed in to change notification settings - Fork 14
46 lines (43 loc) · 1.36 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
name: Rebuild gh-pages
on:
push:
branches:
- master
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/cache@v3
with:
path: |
.tox
~/.cache/pip
key: "ghpages_${{ hashFiles('misc/requirements/requirements*.txt') }}_${{ hashFiles('scripts/src2rst.py') }}"
- name: Set up python
uses: actions/[email protected]
with:
python-version: '3.x'
- name: Install tox
run: |
python -m pip install --upgrade pip
pip install -r misc/requirements/requirements_tox.txt
- name: Clone gh-pages branch
run:
git clone https://github.com/karlch/vimiv-qt.git gh-pages --branch gh-pages --single-branch
- name: Rebuild documentation with tox
run: |
tox -e docs -- gh-pages
- name: Commit documentation changes
run: |
cd gh-pages
git config --local user.email "[email protected]"
git config --local user.name "Christian Karl"
git add .
git commit -a -m "Automatic update of gh-pages website" -m "Caused by $(git --git-dir ../.git rev-parse HEAD)." || true
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: gh-pages
directory: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}