Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save brian-lim-42/5445602f64095649a5e27cf28fded987 to your computer and use it in GitHub Desktop.
Save brian-lim-42/5445602f64095649a5e27cf28fded987 to your computer and use it in GitHub Desktop.
AWS Amplify Gen 2 YAML
version: 1
applications:
- appRoot: amplify
version: 1
backend:
phases:
preBuild:
commands:
- corepack enable
- corepack prepare [email protected] --activate
- pnpm config set store-dir .pnpm-store
- pnpm i --no-cache
- export SHELL=/bin/bash
- pnpm setup
build:
commands:
- pnpm i --no-cache --store-dir .pnpm-store
- pnpm add ampx
- npx ampx pipeline-deploy --branch $AWS_BRANCH --app-id $AWS_APP_ID
frontend:
phases:
preBuild:
commands:
- cd ../apps/web
- pnpm i --frozen-lockfile --no-cache
build:
commands:
- pnpm build
artifacts:
baseDirectory: ../apps/web/dist
files:
- '**/*'
cache:
paths:
- apps/web/node_modules/**/*
- .pnpm-store
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment