-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (35 loc) · 1.16 KB
/
estimate_ww_re.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
# This workflow is to re-generate wastewater Re estimates
name: Calculate Wastewater-based Re
on:
# Option to manually trigger deploy
workflow_dispatch:
push:
branches:
- 'master'
paths:
# Only run when a relevant file is updated
- 'data/clean_data_bs.csv'
- 'data/clean_data_eawag.csv'
jobs:
estimate-ww-re:
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
# Load repo and install R, package dependencies
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-r-dependencies@v2 # install (possibly cached) dependencies from DESCRIPTION
# Run R script
- name: Estimate Re
run: Rscript R/estimate_wastewater_re.R
# Commit new files to data folder
- name: Commit files
run: |
git config --local user.name actions-user
git config --local user.email "[email protected]"
git add app/data/ww_loads.csv
git add app/data/ww_re_estimates.csv
git commit -am "GH ACTION calculate-ww-re $(date)"
git fetch; git merge
git push origin master