diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index cf61ad4..ea0ed3b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -17,7 +17,7 @@ jobs: port: 22 script: | cd /var/www/luizautomoveis - git config --global --add safe.directory /var/www/luizautomoveis - git pull - npm install - pm2 restart luizautomoveis \ No newline at end of file + git fetch origin main + git reset --hard origin/main + npm install --production + pm2 restart luizautomoveis || pm2 start server.js --name luizautomoveis \ No newline at end of file