Skip to content

Update wastewater data #40

Update wastewater data

Update wastewater data #40

# 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