Fix fetching of datasets #168
Workflow file for this run
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: Docs | |
on: [push, pull_request, release] | |
jobs: | |
setup: | |
name: Setup docs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@main | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install black jupytext | |
python -m pip install nbconvert ipykernel | |
python -m pip install sphinx nbsphinx | |
python -m pip install . | |
- name: Run notebooks | |
run: | | |
jupytext --to ipynb --pipe black --execute docs/markdown/public_data_access.md | |
jupytext --to ipynb --pipe black --execute docs/markdown/detector_model.md | |
jupytext --to ipynb --pipe black --execute docs/markdown/source_model.md | |
jupytext --to ipynb --pipe black --execute docs/markdown/simulation.md | |
jupytext --to ipynb --pipe black --execute docs/markdown/point_source_likelihood.md | |
jupytext --to ipynb --pipe black --execute docs/markdown/point_source_analysis.md | |
jupytext --to ipynb --pipe black --execute docs/markdown/events.md | |
mv docs/markdown/*.ipynb docs/notebooks | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: notebooks-for-${{ github.sha }} | |
path: docs/notebooks | |
- name: Generate API docs | |
run: | | |
sphinx-apidoc -f -e -o docs/api icecube_tools | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: api-for-${{ github.sha }} | |
path: docs/api | |
build: | |
name: Build docs | |
runs-on: ubuntu-latest | |
needs: setup | |
steps: | |
- name: Setup | |
run: sudo apt-get install -y pandoc | |
- name: Checkout | |
uses: actions/checkout@main | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install . | |
- uses: actions/download-artifact@v4 | |
with: | |
name: notebooks-for-${{ github.sha }} | |
path: docs/notebooks | |
- uses: actions/download-artifact@v4 | |
with: | |
name: api-for-${{ github.sha }} | |
path: docs/api | |
- name: Build and Commit | |
uses: sphinx-notes/pages@master | |
with: | |
documentation_path: docs | |
- name: Push changes | |
if: github.event_name == 'push' && github.ref_name == 'master' | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: gh-pages |