Skip to content

Commit

Permalink
fix: branch name for url
Browse files Browse the repository at this point in the history
  • Loading branch information
emmenko committed Oct 27, 2023
1 parent 3a547cc commit c11466d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c11466d

Please sign in to comment.