Skip to content

Commit

Permalink
Add behaviour for workflows_dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
smithara committed May 7, 2024
1 parent e03330c commit a5cca42
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ jobs:
NETLIFY_ALIAS="preview-${BRANCH_NAME}"
GH_DEPLOY_ENV="${BRANCH_NAME}"
ENABLE_GH_DEPLOY="true"
elif [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
RUN_REF=$(echo "${{ github.ref }}" | sed 's|.*/||')
BRANCH_NAME="${{ github.ref }}"
NETLIFY_ALIAS="preview-${BRANCH_NAME}"
GH_DEPLOY_ENV="${BRANCH_NAME}"
ENABLE_GH_DEPLOY=$(if [[ "$BRANCH_NAME" == "master" || "$BRANCH_NAME" == "staging" ]]; then echo "true"; else echo "false"; fi)
fi
if [ "$BRANCH_NAME" == "staging" ]; then
Expand Down

0 comments on commit a5cca42

Please sign in to comment.