Skip to content

Re-organization of tutorials #440

Re-organization of tutorials

Re-organization of tutorials #440

Workflow file for this run

# Simple workflow for deploying static content to GitHub Pages
name: Run/Publish Jupyter notebooks
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
pull_request:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup NoisePy
uses: ./.github/actions/setup
with:
python-version: "3.10"
- name: Build pages
id: build
continue-on-error: true
run: |
cd tutorials
pip install -r requirements.txt
jb build . -W
cd ..
- name: Publish as artifact
uses: actions/upload-artifact@v3
if: github.event_name == 'pull_request' || steps.build.outcome == 'failure'
with:
path: './tutorials/_build/html'
- name: Setup Pages
if: github.event_name == 'push' && steps.build.outcome == 'success'
uses: actions/configure-pages@v3
- name: Upload pages artifact
if: github.event_name == 'push' && steps.build.outcome == 'success'
uses: actions/upload-pages-artifact@v1
with:
# Upload html output
path: './tutorials/_build/html'
- name: Deploy to GitHub Pages
if: github.event_name == 'push' && steps.build.outcome == 'success'
id: deployment
uses: actions/deploy-pages@v2
- name: Job failed
if: steps.build.outcome != 'success'
run: |
echo Build step outcome: ${{steps.build.outcome}}
exit 1