diff --git a/.github/workflows/website.yaml b/.github/workflows/website.yaml index 6a76810..5e903c5 100644 --- a/.github/workflows/website.yaml +++ b/.github/workflows/website.yaml @@ -38,11 +38,13 @@ jobs: - name: Build Site run: pkgdown::build_site() shell: Rscript {0} - - name: Commit and push changes for review + - name: Commit and push changes for review in new PR off main run: | git config --local user.name "$GITHUB_ACTOR" git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com" - git add man/\* NAMESPACE DESCRIPTION - git commit -m "Update documentation" || echo "No changes to commit" - git pull --ff-only - git push origin + BRANCH=$(docs_update_${GITHUB_BASE_REF}_${GITHUB_SHA}) + git checkout -b $BRANCH + git add docs/\* + git commit -m "Update website documentation" || echo "No changes to commit" + git pull origin main --ff-only + git push origin $BRANCH