-
Notifications
You must be signed in to change notification settings - Fork 12
53 lines (41 loc) · 1.24 KB
/
doc.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
name: doc
on:
push:
branches: ["main"]
# Prevent doc action on `main` to conflict with each others.
concurrency:
group: doc-${{ github.ref }}
cancel-in-progress: true
jobs:
doc:
runs-on: "ubuntu-latest"
timeout-minutes: 30
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout the code
uses: actions/checkout@v3
- name: Setup mamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: env.yml
environment-name: graphium
cache-environment: true
cache-downloads: true
- name: Install library
run: |
python -m pip install --no-deps .
pip install typer-cli
- name: Configure git
run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Deploy the doc
run: |
echo "Auto-generating typer docs"
typer graphium.cli.__main__ utils docs --name graphium --output docs/cli/graphium.md
echo "Get the gh-pages branch"
git fetch origin gh-pages
echo "Build and deploy the doc on main"
mike deploy --push main