diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8aae11c5..c8e1340d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -100,20 +100,20 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Create archive branch - #if: startsWith(github.ref, 'refs/tags/v') + if: startsWith(github.ref, 'refs/tags/v') run: | - echo "Creating archive branch archive-${{ github.refname }}" - #if git show-ref --quiet "refs/heads/archive-${{ github.refname }}"; then - # echo "archive-${{ github.refname }}" branch exists - #else - # git branch "archive-${{ github.refname }}" gh-pages - #fi + echo "Creating archive branch archive-${{ github.ref_name }}" + if git show-ref --quiet "refs/heads/archive-${{ github.ref_name }}"; then + echo "archive-${{ github.ref_name }}" branch exists + else + git branch "archive-${{ github.ref_name }}" gh-pages + fi - name: Render tag and save rendered state in separate branch uses: quarto-dev/quarto-actions/publish@v2 if: startsWith(github.ref, 'refs/tags/v') with: - target: "archive-${{ github.refname }}" + target: "archive-${{ github.ref_name }}" path: docs env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}