From c11466d2548d501fd1ba5393af98078fc1dc3d70 Mon Sep 17 00:00:00 2001 From: Nicola Molinari Date: Fri, 27 Oct 2023 15:35:28 +0200 Subject: [PATCH] fix: branch name for url --- .github/workflows/deploy-preview.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 2f8f7ab6..b5d4d993 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -34,13 +34,13 @@ jobs: - name: Extract branch name id: branch - # Extract the branch name and replace `/` with `-`. + # Extract the branch name and replace `/` or `.` with `-`. # ${parameter//pattern/string} # Notice the double `//` to replace all occurrences. run: | echo "Extracting branch name ${{ github.head_ref }}" branch_name=${{ github.head_ref }} - echo "::set-output name=name::$(echo ${branch_name//\//-})" + echo "::set-output name=name::$(echo ${branch_name//[\/|\.]/-})" shell: bash - name: Deploying to surge (preview)