-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (46 loc) · 1.24 KB
/
update-status.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
on:
push:
paths:
- '**.Rmd'
- '.github/workflows/*'
workflow_dispatch:
schedule:
- cron: '00 9 * * *'
repository_dispatch:
types: ['status-update']
name: Render Status
jobs:
render:
name: Render Status
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.PAT }}
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 2
extra-packages: |
any::devtools
any::rmarkdown
any::rcmdcheck
any::gh
any::purrr
any::dplyr
any::tidyr
any::glue
any::readr
any::knitr
- name: Check
run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error")
shell: Rscript {0}
- name: Execute Script
run: |
Rscript "data-raw/update.R"
- name: Commit results
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git commit --all -m "[status] $(date +'%F %T %Z')" || echo "No changes to commit"
git push origin || echo "No changes to commit"