From 499dd85fc79b80276185ebdfdd25fda63268bc09 Mon Sep 17 00:00:00 2001 From: nikosbosse Date: Wed, 20 Dec 2023 10:13:10 +0100 Subject: [PATCH] copy render readme action from epinowcast --- .github/workflows/render_readme.yaml | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/.github/workflows/render_readme.yaml b/.github/workflows/render_readme.yaml index 431805fef..d2053f89e 100644 --- a/.github/workflows/render_readme.yaml +++ b/.github/workflows/render_readme.yaml @@ -1,10 +1,8 @@ -# 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: @@ -12,11 +10,6 @@ on: 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 @@ -24,7 +17,7 @@ jobs: 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 @@ -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"