-
Notifications
You must be signed in to change notification settings - Fork 0
28 lines (27 loc) · 1002 Bytes
/
API-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
name: SAM Deployment
on:
push:
branches:
- master
- get-meter-161-name
jobs:
deploy-sam:
name: Deploy Serveless API
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-python@v2
- uses: aws-actions/setup-sam@v2
- 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: us-west-2
- name: Deploy
working-directory: backend
run: |
sam validate
sam package --template-file template.yaml --s3-bucket osu-so-serverless-builds --output-template-file packaged.yaml
sam deploy --template-file /home/runner/work/energy-dashboard/energy-dashboard/backend/packaged.yaml --stack-name energy --capabilities CAPABILITY_IAM --region us-west-2 --no-confirm-changeset --no-fail-on-empty-changeset