Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try Fix deploy issue #4

Merged
merged 1 commit into from
Feb 21, 2025
Merged
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
34 changes: 27 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
cache: 'npm'

- name: Install dependencies
run: npm ci
run: npm install --silent

- name: Run ESLint
run: npm run lint
Expand Down Expand Up @@ -74,18 +74,38 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Install dependencies
- name: Install backend dependencies
run: npm ci --cache .npm --prefer-offline

- name: Deploy to Amplify
- name: Deploy backend
env:
AMPLIFY_APP_ID: ${{ secrets.AWS_APP_ID }}
AWS_BRANCH: ${{ github.ref_name }}
AWS_REGION: ${{ secrets.AWS_REGION }}
AMPLIFY_ENVIRONMENT: ${{ github.ref_name }}
run: npx ampx pipeline-deploy --branch ${{ github.ref_name }} --app-id ${{ secrets.AWS_APP_ID }}
run: npx ampx pipeline-deploy --branch $AWS_BRANCH --app-id $AMPLIFY_APP_ID

- name: Upload Amplify build logs
- name: Build frontend
run: npm run build

- name: Upload build artifacts
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
with:
name: amplify-build-logs
path: amplify/backend/build.log
name: dist
path: dist/**/*

- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
.npm
node_modules
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-

# - name: Upload Amplify build logs
# uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
# with:
# name: amplify-build-logs
# path: amplify/backend/build.log
Loading