Skip to content

Commit

Permalink
Merge pull request #100 from NBISweden/dev-percyfal
Browse files Browse the repository at this point in the history
Test variable substitution
  • Loading branch information
percyfal authored Nov 15, 2023
2 parents b12daad + ff8bd99 commit a24cbf2
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,18 @@ jobs:
- name: Create archive branch
if: startsWith(github.ref, 'refs/tags/v')
run: |
if git show-ref --quiet "refs/heads/archive-${{ github.refname }}"; then
echo "archive-${{ github.refname }}" branch exists
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.refname }}" gh-pages
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 }}
Expand Down Expand Up @@ -142,7 +143,7 @@ jobs:
echo "Directory ${tag} already exsists. Removing"
git rm -f $tag
fi
git clone --depth 1 --branch $tag "https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git" $tag
git clone --depth 1 --branch "archive-$tag" "https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git" $tag
git add -f $tag
contents=$(git tag -n 100 $tag --format "%(contents)")
echo "<section id=\"$tag\" class=\"level3\">" >> index.html
Expand Down

0 comments on commit a24cbf2

Please sign in to comment.