Skip to content

Commit

Permalink
chore: add application key in amplify.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
patrikzita committed Sep 12, 2024
1 parent ad74442 commit 07685f3
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 32 deletions.
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
strict-peer-dependencies=false
auto-install-peers=true
node-linker=hoisted
70 changes: 38 additions & 32 deletions amplify.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,42 @@
version: 1
backend:
phases:
preBuild:
commands:
- npm i -g pnpm
- pnpm config set store-dir .pnpm-store
- pnpm i
build:
commands:
- corepack enable
- pnpm config set node-linker hoisted
- pnpm install --frozen-lockfile
- pnpm exec ampx pipeline-deploy --branch $AWS_BRANCH --app-id $AWS_APP_ID --debug

frontend:
phases:
preBuild:
commands:
- npm i -g pnpm
- pnpm config set store-dir .pnpm-store
- pnpm i
build:
commands:
- npx ampx generate outputs --branch $AWS_BRANCH --app-id $BACKEND_APP_ID
- pnpm nx build main-web"
- mv .env ./.amplify-hosting/compute/default/.env
applications:
- name: amplify-backend
path: libs/amplify-backend
backend:
phases:
preBuild:
commands:
- npm i -g pnpm
- pnpm config set store-dir .pnpm-store
- pnpm i
build:
commands:
- corepack enable
- pnpm config set node-linker hoisted
- pnpm install --frozen-lockfile
- pnpm exec ampx pipeline-deploy --branch $AWS_BRANCH --app-id $AWS_APP_ID --debug

artifacts:
baseDirectory: .amplify-hosting
files:
- '**/*'
- name: main-web
path: apps/main-web
frontend:
phases:
preBuild:
commands:
- npm i -g pnpm
- pnpm config set store-dir .pnpm-store
- pnpm i
build:
commands:
- npx ampx generate outputs --branch $AWS_BRANCH --app-id $BACKEND_APP_ID
- pnpm nx build main-web
- mv .env ./.amplify-hosting/compute/default/.env

cache:
paths:
- .pnpm-store/**/*
artifacts:
baseDirectory: .amplify-hosting
files:
- '**/*'

cache:
paths:
- .pnpm-store/**/*

0 comments on commit 07685f3

Please sign in to comment.