diff --git a/.github/workflows/website.yaml b/.github/workflows/website.yaml index 72d0fe9..1e24166 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}}