-
Notifications
You must be signed in to change notification settings - Fork 1
69 lines (66 loc) · 1.89 KB
/
build-site.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
on:
schedule:
# Every day at 9:00 AM UTC / 5:00 AM ET
- cron: '0 9 * 1,2,9-12 *'
# TNF 6:00 AM UTC / 2:00 AM ET
- cron: '0 6 * 1,2,9-12 5'
# Early window: 10:30 PM UTC / 6:30 PM ET
- cron: '30 22 * 1,2,9-12 0'
# Late window: 0:35 AM UTC / 8:35 PM ET
- cron: '35 0 * 1,2,9-12 1'
# SNF/MNF: 6:00 AM UTC / 2:00 AM ET
- cron: '00 6 * 1,2,9-12 1'
- cron: '00 6 * 1,2,9-12 2'
workflow_dispatch:
# push:
# branches:
# - main
# - master
# pull_request:
# branches:
# - main
# - master
name: build-site
jobs:
build-site:
runs-on: ubuntu-22.04
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 1
extra-packages: |
rstudio/crosstalk#70
ffverse/ffpros
nflverse/nflreadr
glin/reactable
dplyr
forcats
tidyr
janitor
glue
htmltools
rmarkdown
distill
knitr
stringr
- name: Render
run: |
rmarkdown::render_site()
shell: Rscript {0}
- name: Commit results
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git pull
git add .
git commit -m "Updated site on `date`" || echo "No changes to commit"
git push origin main || echo "No changes to commit"