-
Notifications
You must be signed in to change notification settings - Fork 5
50 lines (50 loc) · 1.59 KB
/
release.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
name: Build docs
on:
repository_dispatch:
types: [release]
jobs:
build-docs:
runs-on: ubuntu-latest
env:
GAMMAPY_DATA: /home/runner/work/gammapy-docs/gammapy-docs/gammapy-datasets/${{ github.event.client_payload.release }}
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install base dependencies
run: |
python -m pip install --upgrade pip
python -m pip install 'tox<4'
- name: Install Gammapy
run: |
git clone https://github.com/gammapy/gammapy.git
cd gammapy
git checkout ${{ github.event.client_payload.release }}
python -m pip install tqdm requests
python -m pip install -e .
- name: Download datasets
run: |
gammapy download datasets
- name: Build docs
run: |
GAMMAPY_DATA=${GAMMAPY_DATA//v}
cd gammapy
tox -e build_docs
- name: Copy docs
run: |
release=${{ github.event.client_payload.release }}
release=${release//v}
mv gammapy/docs/_build/html docs/${release}
rm -rf gammapy
sed -i -E 's|url=\.\./.*"|url=../${release}"|' docs/stable/index.html
- name: Commit changes
uses: stefanzweifel/[email protected]
if: success()
with:
commit_author: GitHub Actions <[email protected]>
commit_message: commit docs build