-
Notifications
You must be signed in to change notification settings - Fork 292
70 lines (59 loc) · 1.47 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
66
67
68
69
70
name: Docs
on:
push:
branches:
- develop
paths:
- "docs/**"
pull_request:
branches:
- develop
paths:
- "docs/**"
workflow_dispatch:
jobs:
build-docs:
if: github.repository == 'ohcnetwork/care'
name: Build docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: 'pipenv'
- name: Install pipenv
run: pip install pipenv
- name: Install dependencies
run: pipenv sync --categories "docs"
- name: Build docs
run: |
make -C ./docs html
- name: Upload sphinx documentation
uses: actions/upload-artifact@v4
with:
name: sphinx-docs
path: ./docs/_build/html
retention-days: 30
deploy-docs:
if: github.repository == 'ohcnetwork/care' && github.ref == 'refs/heads/develop'
name: Deploy docs
runs-on: ubuntu-latest
needs: build-docs
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Download sphinx documentation
uses: actions/download-artifact@v4
with:
name: sphinx-docs
path: ./build
- name: Add files to bypass jekyll build
run: |
touch build/.nojekyll
- name: Deploy docs
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: build