Skip to content

Publish certain notebooks #152

Publish certain notebooks

Publish certain notebooks #152

Workflow file for this run

name: Publish certain notebooks
on:
push:
branches: ['main']
workflow_dispatch:
schedule:
- cron: '0 9 * * THU'
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: google-github-actions/auth@v1
with:
credentials_json: '${{ secrets.GCP_KEY_CONTAINER_REGISTRY }}'
- uses: google-github-actions/setup-gcloud@v1
- run: gcloud auth configure-docker
- run: gcloud info
- run: docker compose up --detach
shell: bash
- run: ./scripts/wait-for-mysql.sh
shell: bash
- run: ./scripts/import_anonymous_data.sh
shell: bash
- uses: actions/[email protected]
with:
python-version: '3.11'
cache: 'pip'
- name: Install requirements
run: pip install -r requirements.txt
- name: Export notebooks
run: |
jupyter nbconvert src/Community-Statistik-inkl-Aktivierungsrate.ipynb --execute --to html
jupyter nbconvert src/Community-Statistik+KPI-Uebersicht.ipynb --execute --to html
env:
JUPYTER_CONFIG_DIR: ./jupyter
- name: Prepare public folder
run: |
mkdir public
cp src/*.html public
- name: Setup Pages
id: pages
uses: actions/configure-pages@v2
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: public
deploy:
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v1