Skip to content

fix: 🐛 fix schema drift #283

fix: 🐛 fix schema drift

fix: 🐛 fix schema drift #283

Workflow file for this run

name: deploy
on:
push:
branches:
- main
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Update and Restart Node Server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
password: ${{ secrets.SSH_PASSWORD }}
script: |
cd /home/tarnum/itemdb/
git fetch origin main
git reset --hard FETCH_HEAD
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
yarn
npx prisma migrate deploy
pm2 stop ecosystem.config.js
BUILD_DIR=temp yarn build || exit
if [ ! -d "temp" ]; then
echo '\033[31m temp directory does not exist!\033[0m'
exit 1;
fi
# delete `.next` folder
rm -rf .next
# rename `temp` folder to `.next`
mv temp .next
pm2 reload ecosystem.config.js