This commit is contained in:
parent
cde7d5feb4
commit
eea16096c3
1 changed files with 10 additions and 4 deletions
|
|
@ -65,14 +65,20 @@ jobs:
|
|||
run: |
|
||||
echo "⚡ INFO Installing rsync"
|
||||
apt-get update && apt-get install -y rsync
|
||||
|
||||
echo "⚡ INFO Retrieving SSH key for deploy user"
|
||||
echo "${{ secrets.VPS_DEPLOY_USER_SSH_KEY }}" > /tmp/ssh_key
|
||||
chmod 600 /tmp/ssh_key
|
||||
|
||||
echo "⚡ INFO Stopping server on VPS"
|
||||
ssh -i /tmp/ssh_key ${{vars.VPS_DEPLOY_USER}} sudo /usr/bin/systemctl stop eolas-api.service
|
||||
echo "⚡ INFO Copy files (rsync)"
|
||||
rsync -avz --delete --inplace --exclude='.env' -e "ssh -i /tmp/ssh_key -o StrictHostKeyChecking=no" ./ ${{ vars.VPS_DEPLOY_USER }}:/var/www/eolas-api/
|
||||
# rsync -avz --delete --inplace --exclude='.env' -e "ssh -i /tmp/ssh_key -o StrictHostKeyChecking=no" ./ ${{ vars.VPS_DEPLOY_USER }}:/var/www/eolas-api/
|
||||
echo "⚡ INFO Run npm install on VPS"
|
||||
# npm install --omit=dev
|
||||
# SSH: npm install --omit=dev
|
||||
echo "⚡ INFO Restarting systemd service"
|
||||
# sudo systemctl daemon-reload
|
||||
# sudo systemctl restart eolas-api
|
||||
# SSH: sudo /usr/bin/systemctl daemon-reload
|
||||
# SSH: sudo /usr/bin/systemctl restart eolas-api.service
|
||||
rm /tmp/ssh_key
|
||||
|
||||
NEXT! add required Vars to systemd file
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue