Skip to content

Commit 0b89f97

Browse files
committed
Consolidate documentation workflow
1 parent 03b5227 commit 0b89f97

File tree

1 file changed

+6
-60
lines changed

1 file changed

+6
-60
lines changed

.github/workflows/docs.yml

Lines changed: 6 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,15 @@
11
name: Build Docs
2-
32
on:
43
pull_request:
54
merge_group:
65
push:
76
branches: [main]
87
tags:
98
- '*'
10-
11-
env:
12-
COMMIT_EMAIL: [email protected]
13-
MAKE_TARGET: -C python
14-
OWNER: tskit-dev
15-
REPO: tskit
16-
REQUIREMENTS: python/requirements/CI-docs/requirements.txt
17-
189
jobs:
19-
build-deploy-docs:
20-
name: Docs
21-
runs-on: ubuntu-24.04
22-
defaults:
23-
run:
24-
shell: bash -l {0}
25-
steps:
26-
- name: Cancel Previous Runs
27-
uses: styfle/[email protected]
28-
with:
29-
access_token: ${{ github.token }}
30-
31-
- uses: actions/[email protected]
32-
33-
- name: Setup Conda
34-
uses: conda-incubator/[email protected]
35-
with:
36-
miniforge-version: latest
37-
activate-environment: tskit-docs-env
38-
39-
- name: Cache Conda env
40-
uses: actions/[email protected]
41-
with:
42-
path: ${{ env.CONDA }}/envs
43-
key: conda-${{ runner.os }}--${{ runner.arch }}--${{ hashFiles(env.REQUIREMENTS) }}-${{ env.CACHE_NUMBER }}
44-
env:
45-
CACHE_NUMBER: 0
46-
id: cache
47-
48-
- name: Update environment
49-
run: |
50-
mamba install -y python=3.12 doxygen=1.12.0 pip
51-
pip install -r ${{ env.REQUIREMENTS }}
52-
if: steps.cache.outputs.cache-hit != 'true'
53-
54-
- name: Build C module
55-
if: env.MAKE_TARGET
56-
run: make $MAKE_TARGET
57-
58-
- name: Build Docs
59-
run: |
60-
doxygen -v
61-
make -C docs
62-
63-
- name: Trigger docs site rebuild
64-
if: github.ref == 'refs/heads/main'
65-
run: |
66-
curl -X POST https://api.github.com/repos/tskit-dev/tskit-site/dispatches \
67-
-H 'Accept: application/vnd.github.everest-preview+json' \
68-
-u AdminBot-tskit:${{ secrets.ADMINBOT_TOKEN }} \
69-
--data '{"event_type":"build-docs"}'
10+
Docs:
11+
uses: tskit-dev/.github/.github/workflows/docs-build-template.yml@main
12+
with:
13+
requirements-path: python/requirements/CI-docs/requirements.txt
14+
additional-setup: sudo apt-get install -y doxygen
15+
make-command: make -C python

0 commit comments

Comments
 (0)