-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (39 loc) · 1.25 KB
/
ci-cd.yml
File metadata and controls
44 lines (39 loc) · 1.25 KB
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
43
44
name: CI/CD Pipeline
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Install dependencies
run: |
cd src
npm install --production
- name: Build application with SAM
run: sam build
# - name: Run tests
# run: npm test
- name: Deploy to da WOOORRRRLLLD
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-east-1
run: |
sam package \
--output-template-file packaged.yaml \
--s3-bucket my-sam-app-parsity
sam deploy \
--template-file packaged.yaml \
--stack-name my-sam-app \
--capabilities CAPABILITY_IAM