-
Notifications
You must be signed in to change notification settings - Fork 19
51 lines (47 loc) · 1.38 KB
/
publish-site.yaml
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
name: publish-site
on:
# Trigger the workflow on push to main branch
push:
branches:
- main
workflow_dispatch:
schedule:
- cron: '0 0 * * 1' # Weekly on Monday
jobs:
automate-metrics:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Automate Metrics
env:
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
PRIVATE_KEY_ID: ${{ secrets.PRIVATE_KEY_ID }}
run: |
python -m venv analytics-api
source analytics-api/bin/activate
pip install google-analytics-data cartopy matplotlib
python .github/workflows/get-metrics.py
python .github/workflows/write-metrics-md.py
- name: Upload zip
uses: actions/upload-artifact@v4
with:
name: repo-zip
path: .
include-hidden-files: 'true'
build:
needs: automate-metrics
uses: ProjectPythia/cookbook-actions/.github/workflows/build-book.yaml@main
with:
environment_file: 'environment.yml'
environment_name: pythia
path_to_notebooks: 'portal'
build_command: 'make -j4 html'
build_from_code_artifact: 'true'
code_artifact_name: 'repo-zip'
workflow: ''
workflow_conclusion: ''
deploy:
needs: build
uses: ProjectPythia/cookbook-actions/.github/workflows/deploy-book.yaml@main
with:
publish_dir: 'portal/_build/html'