Skip to content

Re-render README.md #19

Re-render README.md

Re-render README.md #19

# 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:
workflow_dispatch:
push:
paths:
- 'README.Rmd'
name: Render README
jobs:
render:
name: Render README
runs-on: macOS-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 }}"}'