Merge branch 'master' of github.com:rOpenGov/sotkanet #14
Workflow file for this run
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
# Workflow derived from https://github.com/r-lib/actions/blob/master/.github/workflows/render-readme.yaml | |
# and https://fromthebottomoftheheap.net/2020/04/30/rendering-your-readme-with-github-actions/ | |
# Workflow triggering derived from: https://stevenmortimer.com/running-github-actions-sequentially/ | |
on: | |
push: | |
paths: | |
- 'README.Rmd' | |
name: Render README | |
jobs: | |
render: | |
name: Render README | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: r-lib/actions/setup-pandoc@master | |
- uses: r-lib/actions/setup-r@master | |
with: | |
use-public-rspm: true | |
- uses: r-lib/actions/setup-r-dependencies@master | |
with: | |
extra-packages: | | |
rmarkdown | |
needs: website | |
- name: Render README | |
run: Rscript -e 'rmarkdown::render("README.Rmd")' | |
- name: Commit results | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Actions" | |
git commit README.md -m 'Re-build README.Rmd' || echo "No changes to commit" | |
git push origin || echo "No changes to commit" | |
- name: Trigger pkgdown workflow | |
if: success() | |
uses: peter-evans/repository-dispatch@v1 | |
with: | |
token: ${{ secrets.ROPENGOV_WORKFLOWS_PAT }} | |
repository: ${{ github.repository }} | |
event-type: trigger-pkgdown-workflow | |
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}' |