mirror of
https://github.com/revoltchat/revite.git
synced 2025-01-08 05:34:43 -05:00
chore: update build steps
This commit is contained in:
parent
05f214e58c
commit
1b524becc0
3 changed files with 11 additions and 8 deletions
|
@ -6,8 +6,8 @@ COPY .env.build .env
|
|||
|
||||
RUN pnpm install --frozen-lockfile
|
||||
RUN pnpm typecheck
|
||||
RUN pnpm build:highmem
|
||||
# wipe node_modules for all packages
|
||||
RUN NODE_OPTIONS='--max-old-space-size=4096' pnpm build:all
|
||||
RUN find . -name "node_modules" -type d -prune
|
||||
RUN pnpm install --prod
|
||||
|
||||
FROM node:16-alpine
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"pull": "node scripts/setup_assets.js",
|
||||
"build:deps": "pnpm run -r build",
|
||||
"build": "rimraf build && node scripts/setup_assets.js --check && vite build",
|
||||
"build:highmem": "NODE_OPTIONS='--max-old-space-size=4096' npm run build",
|
||||
"build:all": "npm run build:deps && npm run build",
|
||||
"preview": "vite preview",
|
||||
"lint": "eslint src/**/*.{js,jsx,ts,tsx}",
|
||||
"fmt": "prettier --write 'src/**/*.{js,jsx,ts,tsx}'",
|
||||
|
|
|
@ -17,16 +17,19 @@ export REVOLT_SAAS=https://github.com/revoltchat/assets
|
|||
# Exit when any command fails
|
||||
set -e
|
||||
|
||||
# 1. Build Revite
|
||||
yarn build
|
||||
# 1. Make sure everything is present and up to date
|
||||
pnpm i
|
||||
|
||||
# 2. Archive built files
|
||||
# 2. Build Revite
|
||||
npm run build:all
|
||||
|
||||
# 3. Archive built files
|
||||
tar -czvf build.tar.gz dist
|
||||
|
||||
# 3. Upload built files
|
||||
# 4. Upload built files
|
||||
scp build.tar.gz $REMOTE:$REMOTE_DIR/build.tar.gz
|
||||
rm build.tar.gz
|
||||
|
||||
# 4. Apply changes
|
||||
# 5. Apply changes
|
||||
ssh $REMOTE "cd $REMOTE_DIR; tar -xvzf build.tar.gz; rm build.tar.gz; $POST_INSTALL"
|
||||
|
||||
|
|
Loading…
Reference in a new issue