Skip to content

Commit

Permalink
Make deploy script atomic
Browse files Browse the repository at this point in the history
  • Loading branch information
oamaok committed Oct 17, 2021
1 parent 7b76303 commit 12c68c2
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
#!/bin/bash
cd ~/modulate
git fetch origin main
git reset --hard origin/main
set -xe

rm -rf build
git clone https://github.com/oamaok/modulate.git build

cd build
yarn
yarn build
yarn run-migrations

cd ~
rm -rf modulate.previous
mv modulate modulate.previous
mv build modulate

cd modulate
pm2 restart ecosystem.config.js

0 comments on commit 12c68c2

Please sign in to comment.