Repository navigation
68 lines (56 loc) · 1.94 KB
/
Copy pathdeploy-dev.yml
File metadata and controls
68 lines (56 loc) · 1.94 KB
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
# Publishes the development documentation (this repo's dev branch, built
# against abTEM's unreleased `dev` branch) under /dev/ on gh-pages. The
# stable docs at the site root are published by deploy-book.yml when main is
# updated (a release) and are the default readers see.
name: deploy-dev-docs
on:
push:
branches: [dev]
paths:
- "docs/**"
- "scripts/**"
- ".github/workflows/deploy-dev.yml"
workflow_dispatch: {}
# Only the newest dev build per push burst needs to deploy.
concurrency:
group: deploy-dev
cancel-in-progress: true
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Set up Python 3.x
uses: actions/setup-python@v6
with:
python-version: 3.x
- name: Install Graphviz (for API inheritance diagrams)
run: |
sudo apt-get update && sudo apt-get install -y graphviz
- name: Install dependencies
run: |
pip install -r docs/requirements.txt
- name: Install abTEM from the dev branch (unreleased)
run: |
pip install --no-deps --force-reinstall git+https://github.com/abTEM/abTEM.git@dev
- name: Mirror the changelog of abTEM dev
run: |
python scripts/fetch_changelog.py dev
- name: Strip orphaned ipywidgets state
run: |
python scripts/check_notebook_widgets.py --fix
- name: Build the book (dev)
env:
ABTEM_DOCS_VERSION: dev
run: |
jupyter book build docs
- name: Deploy to /dev/
uses: peaceiris/actions-gh-pages@v4.1.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html
# destination_dir makes this deploy replace only /dev/, leaving the
# stable site at the root untouched. NEVER add force_orphan here:
# combined with destination_dir it would replace the whole branch
# with only /dev/, wiping the root site.
destination_dir: dev