From 6a06ad9fd61019e241c15ec83bc440e5f95f0851 Mon Sep 17 00:00:00 2001 From: Tripp Shelnutt Date: Sat, 12 Apr 2025 15:56:33 -0400 Subject: [PATCH] add amplify deploy --- .github/workflows/app-cd.yml | 90 ++++++++++++++++++------------------ src/app/amplify.yml | 16 +++++++ src/app/package-lock.json | 26 ++++++----- src/app/package.json | 3 +- 4 files changed, 76 insertions(+), 59 deletions(-) create mode 100644 src/app/amplify.yml diff --git a/.github/workflows/app-cd.yml b/.github/workflows/app-cd.yml index 6314703..bb456f5 100644 --- a/.github/workflows/app-cd.yml +++ b/.github/workflows/app-cd.yml @@ -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 diff --git a/src/app/amplify.yml b/src/app/amplify.yml new file mode 100644 index 0000000..831cd84 --- /dev/null +++ b/src/app/amplify.yml @@ -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/**/* \ No newline at end of file diff --git a/src/app/package-lock.json b/src/app/package-lock.json index a6a367f..642d319 100644 --- a/src/app/package-lock.json +++ b/src/app/package-lock.json @@ -4227,9 +4227,10 @@ "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" }, "node_modules/@types/json-schema": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==" + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "license": "MIT" }, "node_modules/@types/json5": { "version": "0.0.29", @@ -16252,9 +16253,10 @@ } }, "node_modules/tslib": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", - "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" }, "node_modules/tsutils": { "version": "3.21.0", @@ -20422,9 +20424,9 @@ } }, "@types/json-schema": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==" + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==" }, "@types/json5": { "version": "0.0.29", @@ -29067,9 +29069,9 @@ } }, "tslib": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", - "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" }, "tsutils": { "version": "3.21.0", diff --git a/src/app/package.json b/src/app/package.json index 99a65f5..7c7c8a4 100644 --- a/src/app/package.json +++ b/src/app/package.json @@ -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": [