-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathamplify.yml
28 lines (28 loc) · 985 Bytes
/
amplify.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
version: 1
frontend:
phases:
preBuild:
commands:
- nvm install 14
- nvm use 14
- yarn
- yarn add @dendronhq/dendron-cli@latest
build:
commands:
- nvm use 14
- "(test -d .next) && (echo 'updating dendron next...' && cd .next && git reset --hard && git clean -f && git pull && yarn) || (echo 'init dendron next' && npx dendron publish init)"
- '[ $AWS_BRANCH = "dev" ] && cd .next && git fetch && git checkout dev && cd .. || echo 0'
# diagnostics
- "(test -d .next/.next) && (rm -rf .next/.next && echo 'delete next cache' && cd ..) || echo 'no next cache found'"
- "echo 'version check...' && yarn dendron --version"
- "echo 'build and export...' && yarn dendron publish export"
artifacts:
baseDirectory: .next/out
files:
- '**/*'
cache:
paths:
- node_modules/**/*
- .next/node_modules/**/*
- .next/.next/**/*
- .next/.git/**/*