Skip to content

Commit fdc5b5e

Browse files
committed
parallel deploy to regions
1 parent 2b7d0c0 commit fdc5b5e

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.github/workflows/test-deploy-publish.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ jobs:
2828
needs: tests
2929
if: github.ref_name == 'main' || github.ref_name == 'develop'
3030
runs-on: ubuntu-latest
31+
strategy:
32+
matrix:
33+
region: [ us-east-1, us-west-2 ]
3134
env:
3235
AWS_REGION: ${{ vars.AWS_REGION }}
3336
STG_AWS_ACCESS_KEY_ID: ${{ vars.STG_AWS_ACCESS_KEY_ID }}
@@ -45,7 +48,7 @@ jobs:
4548
- name: Checkout code
4649
uses: actions/checkout@v4
4750
- name: Deploy
48-
run: docker compose -f actions-services.yml run --rm app ./scripts/deploy.sh
51+
run: docker compose -f actions-services.yml run --rm app ./scripts/deploy.sh ${{ matrix.region }}
4952

5053
build-and-publish:
5154
name: Build and Publish

scripts/deploy.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,5 @@ fi
3939
# Print the Serverless version in the logs
4040
serverless --version
4141

42-
echo "Deploying stage $STAGE of serverless package..."
43-
serverless deploy --verbose --stage "$STAGE" --region us-east-1
44-
serverless deploy --verbose --stage "$STAGE" --region us-west-2
42+
echo "Deploying stage $STAGE of serverless package to region $1..."
43+
serverless deploy --verbose --stage "$STAGE" --region "$1"

0 commit comments

Comments
 (0)