-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (32 loc) · 1.28 KB
/
deploy_to_prod.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
42
# This workflow will update the code for the production environment
on:
push:
branches: ["release"]
name: Deploy to production
jobs:
build_and_deploy:
name: Deploy
environment:
name: Production
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
- name: Set up SAM
uses: aws-actions/setup-sam@v1
- name: Configure AWS Credentials
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: ap-south-1
- name: Build
run: sam build --use-container -t templates/prod.yaml
- name: Deploy
env:
JWT_SECRET_KEY: ${{ secrets.JWT_SECRET_KEY }}
DB_SERVICE_URL: ${{ secrets.DB_SERVICE_URL }}
DB_SERVICE_TOKEN: ${{ secrets.DB_SERVICE_TOKEN }}
run: sam deploy --stack-name PortalBackendProd --s3-bucket af-portal-backend --no-confirm-changeset --no-fail-on-empty-changeset --region ap-south-1 --capabilities CAPABILITY_IAM --parameter-overrides JwtSecretKey=$JWT_SECRET_KEY DbServiceUrl=$DB_SERVICE_URL DbServiceToken=$DB_SERVICE_TOKEN