Skip to content

Commit 6a06ad9

Browse files
committed
add amplify deploy
1 parent 785af31 commit 6a06ad9

File tree

4 files changed

+76
-59
lines changed

4 files changed

+76
-59
lines changed

.github/workflows/app-cd.yml

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
1-
name: App (CD)
2-
3-
on:
4-
workflow_dispatch:
5-
push:
6-
branches:
7-
- main
8-
paths:
9-
- 'src/app/**'
10-
11-
permissions:
12-
id-token: write
13-
contents: read
14-
15-
jobs:
16-
App_CD:
17-
runs-on: ubuntu-latest
18-
19-
defaults:
20-
run:
21-
working-directory: src/app
22-
23-
steps:
24-
- name: Checkout
25-
uses: actions/checkout@v3
26-
27-
- name: Configure AWS Credentials
28-
uses: aws-actions/configure-aws-credentials@v4
29-
with:
30-
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
31-
aws-region: us-east-1
32-
33-
- name: Use Node.js
34-
uses: actions/setup-node@v3
35-
with:
36-
node-version: 18.x
37-
cache: 'npm'
38-
cache-dependency-path: src/app/package-lock.json
39-
40-
- name: NPM Install
41-
run: npm ci
1+
# name: App (CD)
2+
3+
# on:
4+
# workflow_dispatch:
5+
# push:
6+
# branches:
7+
# - main
8+
# paths:
9+
# - 'src/app/**'
10+
11+
# permissions:
12+
# id-token: write
13+
# contents: read
14+
15+
# jobs:
16+
# App_CD:
17+
# runs-on: ubuntu-latest
18+
19+
# defaults:
20+
# run:
21+
# working-directory: src/app
22+
23+
# steps:
24+
# - name: Checkout
25+
# uses: actions/checkout@v3
26+
27+
# - name: Configure AWS Credentials
28+
# uses: aws-actions/configure-aws-credentials@v4
29+
# with:
30+
# role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
31+
# aws-region: us-east-1
32+
33+
# - name: Use Node.js
34+
# uses: actions/setup-node@v3
35+
# with:
36+
# node-version: 18.x
37+
# cache: 'npm'
38+
# cache-dependency-path: src/app/package-lock.json
39+
40+
# - name: NPM Install
41+
# run: npm ci
4242

43-
- name: NPM Build
44-
run: npm run build --if-present
43+
# - name: NPM Build
44+
# run: npm run build --if-present
4545

46-
- name: NPM Deploy
47-
run: npm run deploy
46+
# - name: NPM Deploy
47+
# run: npm run deploy

src/app/amplify.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version: 1
2+
frontend:
3+
phases:
4+
preBuild:
5+
commands:
6+
- npm ci
7+
build:
8+
commands:
9+
- npm run build
10+
artifacts:
11+
baseDirectory: build
12+
files:
13+
- '**/*'
14+
cache:
15+
paths:
16+
- node_modules/**/*

src/app/package-lock.json

Lines changed: 14 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
"start": "react-scripts start",
2424
"build": "react-scripts build",
2525
"test": "react-scripts test",
26-
"eject": "react-scripts eject",
27-
"deploy": "aws s3 sync build s3://ts-react-app"
26+
"eject": "react-scripts eject"
2827
},
2928
"eslintConfig": {
3029
"extends": [

0 commit comments

Comments
 (0)