-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 1.36 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
42
43
44
45
46
47
48
49
50
51
52
name: Release CI/CD
on:
push:
branches:
- feature/27
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
fetch-tags: true
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20.11.1'
- name: Install Dependencies
run: npm ci
- name: Build
run: unset CI && npm run build
- name: Create Deployment Package
run: zip -qq -r ./build.zip .
shell: bash
- 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: ${{ secrets.AWS_REGION }}
- name: Upload to S3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: aws s3 cp --region ap-northeast-2 ./build.zip s3://smunity/build.zip
- name: Deploy
run: aws deploy create-deployment
--application-name smunity
--deployment-config-name CodeDeployDefault.AllAtOnce
--deployment-group-name smunity-web
--s3-location bucket=smunity,key=build.zip,bundleType=zip