-
Notifications
You must be signed in to change notification settings - Fork 137
80 lines (77 loc) · 2.54 KB
/
deploy-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
71
72
73
74
75
76
77
78
79
80
name: Build and deploy docs
on:
push:
branches:
- develop
- develop-**
jobs:
build-upload-docs:
runs-on: ubuntu-22.04
container:
image: ghcr.io/modm-ext/modm-build-base:2023-03-12
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Fix Git permission/ownership problem
run: |
git config --global --add safe.directory /__w/modm/modm
- name: Update lbuild
run: |
pip3 install --upgrade --upgrade-strategy=eager modm
- name: Mkdocs info
run: |
mkdocs --version
pip3 show mkdocs-material
- name: Clone modm-ext/modm.io repository
uses: actions/checkout@v4
with:
repository: modm-ext/modm.io
ssh-key: ${{secrets.MODM_EXT_MODM_IO_DEPLOY_KEY}}
path: docs/modm.io
- name: Build Homepage
run: |
rm -rf docs/modm.io/docs/*
python3 tools/scripts/synchronize_docs.py
python3 tools/scripts/generate_module_docs.py
(cd docs && mkdocs build)
- name: Push New Docs to Github
run: |
cd docs/modm.io
git config user.email "[email protected]"
git config user.name "modm bot"
git add -A
git diff-index --quiet HEAD || git commit -m "Update"
git push origin master
# Niklas: Running on the old container until I can figure out why the doc generator hangs
api-docs-all:
runs-on: ubuntu-20.04
container:
image: ghcr.io/modm-ext/modm-build-base:2022-09-27
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Fix Git permission/ownership problem
run: |
git config --global --add safe.directory /__w/modm/modm
- name: Update lbuild
run: |
pip3 install --upgrade --upgrade-strategy=eager modm
- name: Full run of docs.modm.io-generator-script
run: |
export TERM=xterm-256color
export COLUMNS=120
python3 tools/scripts/docs_modm_io_generator.py -c -j4 -d
- name: Size of documentation archive
if: always()
run: |
ls -lh modm-api-docs.tar.gz
- name: Upload api documentation to docs.modm.io
if: always()
env:
DOCS_MODM_IO_UPLOAD: ${{ secrets.DOCS_MODM_IO_UPLOAD }}
run: |
curl https://docs.modm.io/upload/compressed --upload-file modm-api-docs.tar.gz --user $DOCS_MODM_IO_UPLOAD