Skip to content

Commit

Permalink
avoid shell error when dist_branch == main
Browse files Browse the repository at this point in the history
  • Loading branch information
scareything committed Oct 12, 2024
1 parent 69b39b0 commit 65d534e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
echo "tag_name=${tag_name}" | tee -a $GITHUB_OUTPUT
dist_branch=$(echo ${target_commitsh} | awk -F / '{print $NF}')
echo "dist_branch=${dist_branch}" | tee -a $GITHUB_OUTPUT
gh_pages_branch="gh-pages$([ "${dist_branch}" != "main" ] && echo "-${dist_branch}")"
gh_pages_branch="gh-pages$([ "${dist_branch}" != "main" ] && echo "-${dist_branch}" || echo "")"
echo "gh_pages_branch=${gh_pages_branch}" | tee -a $GITHUB_OUTPUT
env:
GITHUB_TOKEN: ${{ github.token }}
Expand Down

0 comments on commit 65d534e

Please sign in to comment.