Skip to content

Commit

Permalink
chore: add epic PR deployment step
Browse files Browse the repository at this point in the history
  • Loading branch information
DiogoSoaress committed Jan 31, 2024
1 parent 73dc4c9 commit 11fb25b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}

# Extract branch name
- name: Extract branch name
if: startsWith(github.ref, 'refs/heads/epic-')
shell: bash
## Remove the prefix "refs/heads/", allow only alphanumeric characters and convert to lower case,
run: |
echo "branch=$(echo $GITHUB_HEAD_REF | sed 's/refs\/heads\///' | sed 's/[^a-z0-9]/_/ig' | sed 's/[A-Z]/\L&/g')" >> $GITHUB_OUTPUT
echo "GitHub Ref: $GITHUB_REF"
echo "GitHub Head Ref: $GITHUB_HEAD_REF"
echo "GitHub Output: $GITHUB_OUTPUT"
# Deploy the main branch to staging
- name: Deploy to the staging S3
if: github.ref == 'refs/heads/main'
Expand Down

0 comments on commit 11fb25b

Please sign in to comment.