Skip to content

Merge pull request #22 from serlo/toc #66

Merge pull request #22 from serlo/toc

Merge pull request #22 from serlo/toc #66

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/mysql/wait-for-mysql.sh
shell: bash
- run: ./scripts/mysql/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/analysis-of-our-trello-board.ipynb --execute --to html
env:
JUPYTER_CONFIG_DIR: ./jupyter
TRELLO_API_KEY: ${{ secrets.TRELLO_API_KEY }}
TRELLO_TOKEN: ${{ secrets.TRELLO_TOKEN }}
- 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