Skip to content

Commit

Permalink
Use alias to scope variable to branch (#3266)
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarvarela authored Dec 5, 2024
1 parent cce27d9 commit 7983cc6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,8 @@ jobs:
continue-on-error: true
run: |
# Extract branch name from ref (removes refs/heads/ prefix)
BRANCH_NAME=$(echo $GITHUB_HEAD_REF | sed 's/refs\/heads\///')
if [[ ! -z "${{ inputs.netlify-alias }}" ]]; then
netlify env:set NEXTAUTH_URL ${{ inputs.site-url || vars.SITE_URL }} --context "branch:${BRANCH_NAME}"
netlify env:set NEXTAUTH_URL ${{ inputs.site-url || vars.SITE_URL }} --context "branch:${{ inputs.netlify-alias }}"
fi
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
Expand Down

0 comments on commit 7983cc6

Please sign in to comment.