-
Notifications
You must be signed in to change notification settings - Fork 3
53 lines (48 loc) · 1.36 KB
/
pages.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
#Github workflow for building documentation
#
#SPDX-FileCopyrightText: 2022 Birger Schacht
#SPDX-License-Identifier: MIT
name: "Build documentation"
on:
push:
branches: main
paths-ignore:
- '.github/**'
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- name: Install documentation dependencies
run: |
pip install poetry
poetry install --with docs --with tests
- name: Build docs
run: poetry run make -C "$GITHUB_WORKSPACE/docs" html
- name: Build coverage
run: |
poetry run coverage run --source="." manage.py test
poetry run coverage html
- uses: actions/checkout@v3
with:
path: apis-core-rdf-pages
ref: pages
- name: Commit new docs
run: |
cd apis-core-rdf-pages
git rm -rf *
cp -r $GITHUB_WORKSPACE/docs/_build/html/* .
cp -r $GITHUB_WORKSPACE/htmlcov .
rm -f htmlcov/.gitignore
touch .nojekyll
git config user.name github-actions
git config user.email [email protected]
git add .
if ! git diff --staged --exit-code .; then
git commit -m "Updated documentation"
git push --set-upstream origin pages
fi