Skip to content

Commit

Permalink
Fix file paths for deployment CD. (#95)
Browse files Browse the repository at this point in the history
* fix path error in deployment yaml

* fix path error in deployment yaml
  • Loading branch information
theoden42 authored Nov 10, 2024
1 parent 80f63f3 commit 7e81489
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ jobs:

- name: Copy new changes
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.VCM_HOST_USERNAME }}@${{ secrets.VCM_HOST_DNS }} 'rm -rf ${{ secrets.VCM_FRONTEND_DIR }}'
ssh -o StrictHostKeyChecking=no ${{ secrets.VCM_HOST_USERNAME }}@${{ secrets.VCM_HOST_DNS }} 'rm -rf ${{ secrets.VCM_FRONTEND_DIR }}/*'
scp -o StrictHostKeyChecking=no -r ./* ${{ secrets.VCM_HOST_USERNAME}}@${{ secrets.VCM_HOST_DNS }}:${{ secrets.VCM_FROTEND_DIR }}
- 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
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 7e81489

Please sign in to comment.