-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (63 loc) · 1.77 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
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/setup-python@v4.7.0
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