dev-docs #1037
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build dev docs | |
on: | |
repository_dispatch: | |
types: [dev-docs] | |
workflow_dispatch: {} | |
jobs: | |
build-docs: | |
runs-on: ubuntu-latest | |
env: | |
GAMMAPY_DATA: /home/runner/work/gammapy-docs/gammapy-docs/gammapy-datasets/dev | |
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 | |
- name: Install Gammapy | |
run: | | |
git clone https://github.com/gammapy/gammapy.git | |
cd gammapy | |
python -m pip install tqdm requests | |
python -m pip install -e . | |
- name: Download datasets | |
run: | | |
gammapy download datasets | |
- name: Build docs | |
run: | | |
cd gammapy | |
tox -e build_docs | |
- name: copy docs | |
run: | | |
rm -rf docs/dev | |
cp -r gammapy/docs/_build/html docs/dev | |
rm -rf gammapy | |
- name: commit changes | |
uses: stefanzweifel/[email protected] | |
if: success() | |
with: | |
commit_author: GitHub Actions <[email protected]> | |
commit_message: commit docs dev version |