-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (35 loc) · 1.45 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Deploy to Amazon ECS
on:
push:
branches:
- main
env:
applicationfolder: ./
AWS_REGION: sa-east-1
ECR_REPOSITORY: 186912366203.dkr.ecr.sa-east-1.amazonaws.com/my-first-ecr-repo # set this to your Amazon ECR repository name
ECS_SERVICE: my-first-service
ECS_CLUSTER: my-cluster # set this to your Amazon ECS cluster name
ECS_TASK_DEFINITION: my-first-task # set this to the path to your Amazon ECS task definition e.g. .aws/task-definition.json
CONTAINER_NAME: spotify-liked-songs-clustering-docker-image # set this
S3_BUCKET: spotify-liekd-songs-cluster-webappdeploymentbucket-uigxxoklltki
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.12.1
- uses: aws-actions/setup-sam@v2
with:
use-installer: true
- uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}
# sam build
- run: sam build --use-container
# Run Unit tests- Specify unit tests here
# sam deploy
- run: sam deploy --no-confirm-changeset --no-fail-on-empty-changeset --stack-name sam-hello-world --s3-bucket ${{ env.S3_BUCKET }} --capabilities CAPABILITY_IAM --region ${{ env.AWS_REGION }}