Skip to content

Commit

Permalink
use git pull instead of rote copying
Browse files Browse the repository at this point in the history
  • Loading branch information
theoden42 committed Nov 10, 2024
1 parent 88d40ad commit 32ab5cf
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY_VCM }}

<<<<<<< HEAD
<<<<<<< HEAD
- name: Pull New Changes
run: |
Expand All @@ -32,14 +33,19 @@ jobs:
=======
scp -o StrictHostKeyChecking=no -r ./* ${{ secrets.VCM_HOST_USERNAME}}@${{ secrets.VCM_HOST_DNS }}:${{ secrets.VCM_FROTEND_DIR }}
>>>>>>> 1a50dd6 (fix path error in deployment yaml)
=======
- name: Pull New Changes
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.VCM_HOST_USERNAME }}@${{ secrets.VCM_HOST_DNS }} 'sudo cd ${{secrets.VCM_FRONTEND_DIR}}
&& sudo git pull origin main'
>>>>>>> 5b8e8ef (use git pull instead of rote copying)
- name: Build the changes and deploy
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.VCM_HOST_USERNAME }}@${{ secrets.VCM_HOST_DNS }} << EOF
sudo cd ${{ secrets.VCM_FRONTEND_DIR }}
sudo npm install --legacy-peer-deps
sudo npm run build
sudo rm -rf /var/www/*
sudo rm -rf /var/www/*
sudo cp -r dist/* /var/www/
sudo systemctl restart nginx
EOF
Expand Down

0 comments on commit 32ab5cf

Please sign in to comment.