forked from eco4cast/tern4cast
-
Notifications
You must be signed in to change notification settings - Fork 5
120 lines (102 loc) · 3.26 KB
/
combined.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
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
schedule:
- cron: '0 4 * * *'
workflow_dispatch:
name: submissions-score-dashboard
jobs:
submissions:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
OSN_KEY: ${{ secrets.OSN_KEY }}
OSN_SECRET: ${{ secrets.OSN_SECRET }}
container: rqthomas/vera-rocker:latest
steps:
- uses: actions/checkout@v4
- name: Process submissions
shell: Rscript {0}
run: |
source("submission_processing/process_submissions.R")
- name: Build inventory
shell: Rscript {0}
run: |
source("submission_processing/build_forecast_inventory.R")
scores:
needs: submissions
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
OSN_KEY: ${{ secrets.OSN_KEY }}
OSN_SECRET: ${{ secrets.OSN_SECRET }}
container: rqthomas/vera-rocker:latest
steps:
- uses: actions/checkout@v4
- name: Generate scores
shell: Rscript {0}
run: |
source("scoring/scoring.R")
- name: Update inventory
shell: Rscript {0}
run: |
source("scoring/build_score_inventory.R")
bundling:
needs: scores
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
OSN_KEY: ${{ secrets.OSN_KEY }}
OSN_SECRET: ${{ secrets.OSN_SECRET }}
container: rqthomas/vera-rocker:latest
steps:
- uses: actions/checkout@v4
- name: Install
shell: Rscript {0}
run: |
print(options("repos"))
remotes::install_deps(".", dep=TRUE)
- name: Create bundles
shell: Rscript {0}
run: |
source("submission_processing/bundled-parquet.R")
dashboard:
needs: bundling
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
container: rqthomas/vera-rocker:latest
steps:
- run: git config --system --add safe.directory '*'
- uses: actions/checkout@v4
with:
fetch-depth: 0
set-safe-directory: '*'
- uses: quarto-dev/quarto-actions/setup@v2
with:
version: 1.4.146
#- name: pull scores cache
# shell: Rscript {0}
# run: source("dashboard/cache.R")
- name: Render
run: |
quarto render dashboard
- name: Build site map
shell: Rscript {0}
run: source("dashboard/build_site_map.R")
- name: Publish
run: |
git config user.name github-actions
git config user.email [email protected]
git checkout gh-pages
cp -r dashboard/docs/* .
git add .
git commit -a -m "update pages" || echo "nothing to commit"
git push https://${GITHUB_PAT}:${GITHUB_PAT}@github.com/${GITHUB_REPOSITORY}
- name: Ping Healthchecks
run: |
sudo apt-get update
sudo apt-get install -y curl
curl -m 10 --retry 5 https://hc-ping.com/0bc60dc5-c1c8-4ab6-ad0a-9ae111430950