-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (41 loc) · 1.32 KB
/
ci.cd.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
name: Deploy
on:
pull_request:
branches:
- cdTst
push:
branches:
- cdTst
jobs:
build:
runs-on: ubuntu-24.04
steps:
- name: Checkout source code.
uses: actions/checkout@v2
- name: Check Node v
run: node -v
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: ts & react install
run: npm install --save-dev typescript @types/react @types/react-dom
- name: Build
run: npm run-script build
working-directory: ./Caecae
- name: zip create
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 }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Upload to S3
run: |
aws s3 cp --region ap-northeast-2 ./build.zip s3://mytamra-bucket/build.zip
- name: Deploy
run: aws deploy create-deployment
--application-name caecae-codeDeploy
--deployment-config-name CodeDeployDefault.AllAtOnce
--deployment-group-name caecae-codeDeploy-group
--s3-location bucket=caecae-s3bucket,bundleType=zip,key=build.zip