Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 45 additions & 45 deletions .github/workflows/app-cd.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
name: App (CD)

on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'src/app/**'

permissions:
id-token: write
contents: read

jobs:
App_CD:
runs-on: ubuntu-latest

defaults:
run:
working-directory: src/app

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: us-east-1

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: 'npm'
cache-dependency-path: src/app/package-lock.json

- name: NPM Install
run: npm ci
# name: App (CD)

# on:
# workflow_dispatch:
# push:
# branches:
# - main
# paths:
# - 'src/app/**'

# permissions:
# id-token: write
# contents: read

# jobs:
# App_CD:
# runs-on: ubuntu-latest

# defaults:
# run:
# working-directory: src/app

# steps:
# - name: Checkout
# uses: actions/checkout@v3

# - name: Configure AWS Credentials
# uses: aws-actions/configure-aws-credentials@v4
# with:
# role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
# aws-region: us-east-1

# - name: Use Node.js
# uses: actions/setup-node@v3
# with:
# node-version: 18.x
# cache: 'npm'
# cache-dependency-path: src/app/package-lock.json

# - name: NPM Install
# run: npm ci

- name: NPM Build
run: npm run build --if-present
# - name: NPM Build
# run: npm run build --if-present

- name: NPM Deploy
run: npm run deploy
# - name: NPM Deploy
# run: npm run deploy
16 changes: 16 additions & 0 deletions src/app/amplify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 1
frontend:
phases:
preBuild:
commands:
- npm ci
build:
commands:
- npm run build
artifacts:
baseDirectory: build
files:
- '**/*'
cache:
paths:
- node_modules/**/*
26 changes: 14 additions & 12 deletions src/app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions src/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"deploy": "aws s3 sync build s3://ts-react-app"
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
Expand Down