From a24c36e544311b215415b29502925b373133092e Mon Sep 17 00:00:00 2001 From: bburns632 Date: Mon, 6 May 2024 14:58:59 -0500 Subject: [PATCH] revised branch creation in tag based website docs --- .github/workflows/website.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/website.yaml b/.github/workflows/website.yaml index 72d0fe96..1e241662 100644 --- a/.github/workflows/website.yaml +++ b/.github/workflows/website.yaml @@ -25,7 +25,11 @@ jobs: - name: checkout repository uses: actions/checkout@v4 with: - fetch-depth: 1 + fetch-depth: 0 # checking out latest tag in next step + - name: Get Latest Version Tag + uses: WyriHaximus/github-action-get-previous-tag@v1.4.0 + with: + prefix: 'v' - name: set up R uses: r-lib/actions/setup-r@v2 with: @@ -42,7 +46,7 @@ jobs: run: | git config --local user.name "$GITHUB_ACTOR" git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com" + git checkout -b website_update_${{steps.previoustag.outputs.tag}} git add docs/\* - git commit -m "Update website documentation" || echo "No changes to commit" - git pull --ff-only - git push origin + git commit -m "Update website documentation to ${{steps.previoustag.outputs.tag}}" || echo "No changes to commit" + git push origin website_update_${{steps.previoustag.outputs.tag}}