Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 7 additions & 14 deletions .github/workflows/render_readme.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,23 @@
# Name of the workflow
name: render-readme

# Controls when the action will run. Triggers include:
#
# - button trigger from github action page
# - on changes to readme.Rmd
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

on:
workflow_dispatch:
push:
paths:
- 'README.Rmd'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
render-readme:
runs-on: macos-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repos
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup R
uses: r-lib/actions/setup-r@v2
Expand All @@ -46,6 +39,6 @@ jobs:
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add README.md
git diff-index --quiet HEAD || git commit -m "Automatic readme update"
git status -sb | grep -q ahead && git push origin
git add README.md man/figures/
git diff-index --quiet HEAD || git commit -m "Automatic readme update [ci skip]"
git push origin || echo "No changes to push"