forked from jdjohn215/milwaukee-weather
-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (39 loc) · 1.24 KB
/
UpdateGraphs_scheduled.yml
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
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: true
# 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