-
Notifications
You must be signed in to change notification settings - Fork 3
62 lines (53 loc) · 2.23 KB
/
generate_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
name: generate docs
on:
push:
branches:
- main
repository_dispatch: # Allow access tokens which have write access to this repo to trigger this action
workflow_dispatch: # Allow manual triggering by a user with write access to this repo
jobs:
generate:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: recursive # Fetch Hugo themes (true OR recursive)
fetch-depth: 1 # Fetch all history for .GitInfo and .Lastmod
# TODO: Need a unique key we can pass, but as we're targeting
# arcana@master, this is not trivial.
#
# - name: Cache dependencies
# uses: actions/cache@v1
# with:
# path: ~/.local/lib
# key: ${{ runner.os }}-python-${{ hashFiles('**/package-lock.json') }}
# restore-keys: |
# ${{ runner.os }}-python-
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.11' # Version range or exact version of a Python version to use, using SemVer'
- name: Install python dependencies
run: pip install -r ./requirements.txt
- name: Generate pipeline docs
run: arcana deploy make-docs ./australian-imaging-service docs/pipelines --flatten --default-data-space arcana.common:Clinical
- name: Remove /docs/pipelines/ from .gitignore
run: sed -i 's%^/docs/pipelines/\*$%%' .gitignore
- name: Deploy docs
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: .
publish_branch: docs
enable_jekyll: true # This branch isn't actually fed to GH pages
# It's possible, likely even, that we'll trigger unnecessary docs
# rebuilds with this. Running this properly as a separate workflow
# only when real docs changes occur would require using a PAT.
- name: Trigger rebuild of docs
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.GITHUBPAGES_KEY }}
repository: Australian-Imaging-Service/Australian-Imaging-Service.github.io
event-type: Rebuild docs