Skip to content

Update the PSD fit lightcurve #136

Update the PSD fit lightcurve

Update the PSD fit lightcurve #136

Workflow file for this run

name: ci
on:
pull_request:
types: [opened, synchronize, reopened, closed]
jobs:
process:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
permissions:
contents: write
env:
GAMMAPY_DATA: /home/runner/work/gammapy-recipes/gammapy-recipes/gammapy-datasets
steps:
- name: checkout repo
uses: actions/checkout@v4
- name: create and activate env
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Mambaforge
miniforge-version: latest
activate-environment: gammapy-recipes
environment-file: environment.yml
auto-update-conda: true
- id: grabmodifs
uses: trilom/[email protected]
with:
output: ', '
- name: update env and download data
run: |
IFS=', ' read -r -a array <<< "${{ steps.grabmodifs.outputs.files }}"
for file in ${array[@]}; do
if [[ ${file} =~ "recipes/" ]]; then
folder="$(dirname "${file}")"
env="${folder}/env.yml"
fi
done
if [ -n "${folder}" ] && [ -d "${folder}" ]; then
conda env update --name gammapy-recipes --file ${env}
gammapy download datasets
fi
- name: test notebooks
run: |
IFS=', ' read -r -a array <<< "${{ steps.grabmodifs.outputs.files }}"
for file in ${array[@]}; do
if [[ ${file} =~ "recipes/" ]]; then
folder="$(dirname "${file}")"
fi
done
if [ -n "${folder}" ] && [ -d "${folder}" ]; then
python scripts/process.py --src ${folder}
fi
- name: build docs
run: |
rm -Rf docs/_build/html
cd docs && python -m sphinx . _build/html -b html && cd ..
rm -Rf gammapy-datasets
- name: commit changes
uses: stefanzweifel/git-auto-commit-action@v5
if: github.event.pull_request.merged == true
with:
commit_author: GitHub Actions <[email protected]>
commit_message: commit built documentation
branch : master