Skip to content

fixed planetview

fixed planetview #225

Workflow file for this run

name: Deploy to Server
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Deploy to Server
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.DEPLOY_KEY }}
script: |
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm use 18
cd /var/www/no-game.xyz/nogame-app
git reset --hard origin/master
git pull origin master
NODE_ENV=production
# Decode and set backend .env
echo '${{ secrets.BACKEND_ENV_FILE }}' > packages/backend/.env
# Decode and set frontend .env
echo '${{ secrets.FRONTEND_ENV_FILE }}' > packages/frontend/.env
npm install
npm run build
# Restart PM2 & Nginx processes
pm2 restart all
sudo systemctl reload nginx
# Sanity Check
# Check PM2 processes
pm2 status
if [ $? -ne 0 ]; then
echo "PM2 processes did not restart correctly."
exit 1
fi
# Check Nginx service
systemctl status nginx
if [ $? -ne 0 ]; then
echo "Nginx did not reload correctly."
exit 1
fi