Madison weather update #282
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
schedule: | |
- cron: "0 18 * * *" | |
workflow_dispatch: | |
name: Madison weather update | |
jobs: | |
render: | |
name: Update graphs | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
# don't reinstall R | |
install-r: false | |
# use RStudio's CRAN mirror with precompiled binaries | |
use-public-rspm: true | |
- name: Install required packages | |
run: Rscript -e 'install.packages(c("tidyverse", "ggrepel"), dependencies = TRUE)' | |
- name: Retrieve data | |
uses: nick-fields/retry@v3 | |
with: | |
timeout_seconds: 60 | |
max_attempts: 3 | |
command: Rscript -e 'source("R/Retrieve_GHCN_USW00014837.R")' | |
continue_on_error: true | |
- name: Commit data | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: Update data | |
- name: Build temperature graph | |
run: Rscript -e 'source("R/BuildDailyHigh.R")' | |
- name: Build precipitation graph | |
run: Rscript -e 'source("R/BuildCumulativePrecipitation.R")' | |
- name: Commit graphs | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: Update graphs |