From 3bb1e2a94e99fda4ca76a9d9162f0985778c8e05 Mon Sep 17 00:00:00 2001 From: Sander Devisscher Date: Thu, 22 Aug 2024 14:14:16 +0200 Subject: [PATCH] make sure version is correct #69 --- .github/workflows/Build pkgdown site.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/Build pkgdown site.yaml b/.github/workflows/Build pkgdown site.yaml index 8c33964..7c1f1e7 100644 --- a/.github/workflows/Build pkgdown site.yaml +++ b/.github/workflows/Build pkgdown site.yaml @@ -57,6 +57,19 @@ jobs: run: install.packages('pkgdown') shell: Rscript {0} + - name: pull changes to branch if any + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + git config --global user.name 'github-actions[bot]' + git config --global user.email 'github-actions[bot]@users.noreply.github.com' + if ! git diff --cached --quiet; then + git pull --rebase origin ${{ github.head_ref }} + else + echo "No changes to pull." + fi + + - name: Build pkgdown site run: pkgdown::build_site() shell: Rscript {0}