-
Notifications
You must be signed in to change notification settings - Fork 2
59 lines (51 loc) · 1.63 KB
/
code_ref_gh_pages_generate.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
name: Codebase Sphinx Documentation
on:
push:
branches: [ gh-pages ]
jobs:
build_docs_job:
name: Code Reference Generator
runs-on: windows-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.10.0
- name: Install dependencies
run: |
python -m pip install -U sphinx
python -m pip install furo
python -m pip install django
python -m pip install mock
pip install sphinxjp.themes.basicstrap
cd docker/requirements
pip install ./wheels/python_ldap-3.4.4-cp310-cp310-win_amd64.whl
pip install -r base.txt
pip install sphinxjp
- name: Make the Codebase Reference sphinx docs
run: |
cd docs/codebase_docs/
sphinx-apidoc -o source ../../CodeListLibrary_project
cd source
del "clinicalcode.migrations.rst"
cd ..
sphinx-build -b html source ..
- name: Init new codebase docs repo
run: |
touch .nojekyll
git add -A
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git commit -m "deployed documentation"
- name: Push to destination branch
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
force: true