Skip to content

Commit

Permalink
feat(aws) Move aws regions
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grevin committed Feb 19, 2024
1 parent 7c7767f commit 6a4a857
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
pull_request:

env:
AWS_DEFAULT_REGION: eu-west-2
AWS_DEFAULT_REGION: ${{ github.event_name == 'pull_request' && 'eu-west-3' || 'eu-west-2' }}

jobs:
deploy:
Expand All @@ -20,7 +20,7 @@ jobs:
if: github.event_name == 'pull_request'
run: |
echo "ENV=dev-${{ github.head_ref }}" >> $GITHUB_ENV
echo "ENV_URL=http://dev.blog.eleven-labs.com.s3-website.${{ env.AWS_DEFAULT_REGION }}.amazonaws.com/${{ github.head_ref }}" >> $GITHUB_ENV
echo "ENV_URL=http://dev.blog.eleven-labs.com-tmp.s3-website.${{ env.AWS_DEFAULT_REGION }}.amazonaws.com/${{ github.head_ref }}" >> $GITHUB_ENV
echo "BASE_URL=/${{ github.head_ref }}/" >> $GITHUB_ENV
echo "ALGOLIA_APP_ID=${{ secrets.ALGOLIA_APP_ID }}" >> $GITHUB_ENV
echo "ALGOLIA_INDEX=${{ secrets.ALGOLIA_INDEX_DEV }}" >> $GITHUB_ENV
Expand Down Expand Up @@ -127,7 +127,7 @@ jobs:

- name: Deploy to S3 for dev
if: github.event_name == 'pull_request'
run: aws s3 sync "dist/public/" "s3://dev.blog.eleven-labs.com/${{ github.head_ref }}/" --delete
run: aws s3 sync "dist/public/" "s3://dev.blog.eleven-labs.com-tmp/${{ github.head_ref }}/" --delete

- name: Deploy to S3 for production
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
Expand Down

0 comments on commit 6a4a857

Please sign in to comment.