Skip to content

Commit

Permalink
fix(github): fixed deploy file
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoulaud committed Sep 24, 2024
1 parent 57c8523 commit e933122
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,28 @@ jobs:
FRONTEND_ENV: ${{ secrets.FRONTEND_ENV }}
run: |
ssh $USER@$HOST << EOF
# Navigate to the frontend project directory
set -e
echo "Starting frontend deployment..."
# Source profile and set up PATH
source ~/.profile
export PATH="/home/$USER/.local/share/pnpm:$PATH"
# Navigate to project directory and pull changes
cd /var/www/voodle/client
# Pull the latest changes
git pull origin main
# Update pnpm
npm install -g pnpm
# Setup environment
# Set up environment
echo "$FRONTEND_ENV" > .env
# Install dependencies and build
pnpm install
pnpm run build
# Restart the frontend service
pm2 restart voodle-frontend || pm2 start "pnpm start" --name "voodle-frontend"
# Save PM2 process list
pm2 save
# Reload Nginx if necessary
sudo systemctl reload nginx
echo "Frontend deployment completed successfully"
EOF

0 comments on commit e933122

Please sign in to comment.