Merge pull request #96 from nflverse/draft_chart_2024 #275
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: | |
# Trigger the workflow on push to the master branch | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
# schedule: | |
# run every Friday at 9:00 AM UTC = 5AM ET | |
# - cron: '0 9 * * 5' | |
# pull_request: | |
# branches: | |
# - master | |
name: Seb's Render Site Action | |
jobs: | |
render: | |
name: Render Site | |
runs-on: macOS-latest | |
# The action itself will push to master. Make sure we don't run in a | |
# loop triggering this action by itself | |
if: "!contains(github.event.head_commit.message, 'gh-action-seb')" | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: r-lib/actions/setup-r@v2 | |
- uses: r-lib/actions/setup-pandoc@v1 | |
- name: Install necessary packages | |
run: | | |
install.packages(c("rmarkdown", "distill", "dplyr", "tidyr", "jsonlite", "DT", "stringi"), dependencies = TRUE) | |
shell: Rscript {0} | |
- name: Render Site | |
run: Rscript -e 'rmarkdown::render_site(encoding = "UTF-8")' | |
- name: Commit results | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Actions" | |
git add --ignore-removal . | |
git commit -m 'gh-action-seb re-build site' || echo "No changes to commit" | |
git push origin master || echo "No changes to commit" |