From 27714356c77e521636144fda0192400a37bfdcba Mon Sep 17 00:00:00 2001 From: Shawn Carey Date: Fri, 11 Oct 2024 22:12:08 -0400 Subject: [PATCH] avoid shell error when dist_branch == main --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a73b58c..7f9b515 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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 }}