Skip to content

Commit 9b1748f

Browse files
committed
add GH action for triggering publish docs
1 parent f206b0a commit 9b1748f

File tree

4 files changed

+66
-18
lines changed

4 files changed

+66
-18
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
wkcuber: ${{ steps.filter.outputs.wkcuber || github.ref == 'refs/heads/master' }}
2121
cluster_tools: ${{ steps.filter.outputs.cluster_tools || github.ref == 'refs/heads/master' }}
2222
steps:
23-
- uses: actions/checkout@v2
23+
- uses: actions/checkout@v3
2424
- uses: dorny/paths-filter@v2
2525
id: filter
2626
with:
@@ -46,9 +46,9 @@ jobs:
4646
run:
4747
working-directory: cluster_tools
4848
steps:
49-
- uses: actions/checkout@v2
49+
- uses: actions/checkout@v3
5050
- name: Set up Python ${{ matrix.python-version }}
51-
uses: actions/setup-python@v1
51+
uses: actions/setup-python@v4
5252
with:
5353
python-version: ${{ matrix.python-version }}
5454
architecture: 'x64'
@@ -145,9 +145,9 @@ jobs:
145145
working-directory: webknossos
146146

147147
steps:
148-
- uses: actions/checkout@v2
148+
- uses: actions/checkout@v3
149149
- name: Set up Python ${{ matrix.python-version }}
150-
uses: actions/setup-python@v1
150+
uses: actions/setup-python@v4
151151
with:
152152
python-version: ${{ matrix.python-version }}
153153
architecture: 'x64'
@@ -196,7 +196,7 @@ jobs:
196196
working-directory: wkcuber
197197

198198
steps:
199-
- uses: actions/checkout@v2
199+
- uses: actions/checkout@v3
200200
- name: Set up Python ${{ matrix.python-version }}
201201
uses: actions/setup-python@v2
202202
with:
@@ -243,7 +243,7 @@ jobs:
243243
working-directory: wkcuber
244244

245245
steps:
246-
- uses: actions/checkout@v2
246+
- uses: actions/checkout@v3
247247
- name: Set up Python ${{ matrix.python-version }}
248248
uses: actions/setup-python@v2
249249
with:
@@ -276,7 +276,7 @@ jobs:
276276
working-directory: wkcuber
277277

278278
steps:
279-
- uses: actions/checkout@v2
279+
- uses: actions/checkout@v3
280280
- name: Set up Python ${{ matrix.python-version }}
281281
uses: actions/setup-python@v2
282282
with:
@@ -300,7 +300,7 @@ jobs:
300300
runs-on: ubuntu-latest
301301

302302
steps:
303-
- uses: actions/checkout@v2
303+
- uses: actions/checkout@v3
304304
- name: Set up Python
305305
uses: actions/setup-python@v2
306306
with:
@@ -378,13 +378,13 @@ jobs:
378378
!github.event.pull_request.head.repo.fork
379379
380380
steps:
381-
- uses: actions/checkout@v2
382-
- uses: actions/checkout@v2
381+
- uses: actions/checkout@v3
382+
- uses: actions/checkout@v3
383383
with:
384384
repository: scalableminds/webknossos
385385
path: docs/wk-repo
386386
- name: Set up Python 3.8
387-
uses: actions/setup-python@v1
387+
uses: actions/setup-python@v4
388388
with:
389389
python-version: 3.8
390390
architecture: 'x64'
@@ -443,9 +443,9 @@ jobs:
443443
max-parallel: 4
444444

445445
steps:
446-
- uses: actions/checkout@v2
446+
- uses: actions/checkout@v3
447447
- name: Set up Python 3.8
448-
uses: actions/setup-python@v1
448+
uses: actions/setup-python@v4
449449
with:
450450
python-version: 3.8
451451
architecture: 'x64'

.github/workflows/nightly.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ jobs:
1919
working-directory: webknossos
2020

2121
steps:
22-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v3
2323
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v1
24+
uses: actions/setup-python@v4
2525
with:
2626
python-version: ${{ matrix.python-version }}
2727
architecture: 'x64'

.github/workflows/publish_docs.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Publish docs
2+
3+
on:
4+
workflow_dispatch: ~
5+
6+
jobs:
7+
docs:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
with:
12+
fetch-depth: 0
13+
- uses: actions/checkout@v3
14+
with:
15+
repository: scalableminds/webknossos
16+
path: docs/wk-repo
17+
- name: Set up Python 3.10
18+
uses: actions/setup-python@v1
19+
with:
20+
python-version: 3.10
21+
architecture: 'x64'
22+
23+
- name: Install dependencies
24+
run: |
25+
pip install -r requirements.txt
26+
27+
- name: Build Docs
28+
run: |
29+
docs/generate.sh --persist
30+
31+
- name: Push docs
32+
env:
33+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
34+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
35+
AWS_DEFAULT_REGION: "eu-west-1"
36+
run: |
37+
CI_BRANCH=${GITHUB_HEAD_REF:-$GITHUB_REF_NAME}
38+
NORMALIZED_CI_BRANCH=${CI_BRANCH//[\/-]/_}
39+
aws s3 sync --acl public-read docs/out s3://static.webknossos.org/docs/${NORMALIZED_CI_BRANCH}
40+
41+
- name: Check links (on master)
42+
env:
43+
SLACK_HOOK: ${{ secrets.LINK_CHECKER_SLACK_HOOK }}
44+
run: |
45+
cd docs
46+
poetry run linkchecker https://docs.webknossos.org > link_status || \
47+
curl -X POST --data-urlencode "payload={\"text\": \":warning: Broken Links on doc.webknossos.org :warning:\n"'```'"\n$(cat link_status)\n"'```"}' \
48+
"$SLACK_HOOK"

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ jobs:
1313
env:
1414
VERSION: ${{ github.event.inputs.version }}
1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v3
1717
with:
1818
fetch-depth: 0
1919
token: ${{ secrets.NORMANRZ_PAT }}
2020

21-
- uses: actions/setup-python@v1
21+
- uses: actions/setup-python@v4
2222
with:
2323
python-version: "3.8"
2424
architecture: 'x64'

0 commit comments

Comments
 (0)