Changed deploy to send backend
Some checks failed
Build and Deploy Nuxt / build (push) Failing after 1m46s

This commit is contained in:
2026-03-17 17:15:50 +01:00
parent 687a3c922c
commit 3a48a514d6
2 changed files with 24 additions and 2 deletions

View File

@@ -41,11 +41,26 @@ jobs:
- name: Compress build - name: Compress build
run: tar -czf build.tar.gz .output run: tar -czf build.tar.gz .output
- name: Deploy to server - name: Deploy frontend to server
run: | run: |
scp build.tar.gz deploy@${{ secrets.DEPLOY_HOST }}:/tmp/ scp build.tar.gz deploy@${{ secrets.DEPLOY_HOST }}:/tmp/
ssh deploy@${{ secrets.DEPLOY_HOST }} << 'EOF' ssh deploy@${{ secrets.DEPLOY_HOST }} << 'EOF'
rm -rf /var/www/app/.output rm -rf /var/www/app/.output
tar -xzf /tmp/build.tar.gz -C /var/www/app tar -xzf /tmp/build.tar.gz -C /var/www/app
EOF
- name: Compress backend and deploy
working-directory: ./
run: |
tar -czf backend.tar.gz backend
scp backend.tar.gz deploy@{{ secrets.DEPLOY_HOST }}:/tmp/
ssh deploy@{{ secrets.DEPLOY_HOST }} << 'EOF'
rm -rf /var/www/app/backend
tar -xzf /tmp/backend.tar.gz -C /var/www/app
EOF
- name: Restart server
run: |
ssh deploy@${{ secrets.DEPLOY_HOST }} << 'EOF'
sudo systemctl restart app sudo systemctl restart app
EOF EOF

View File

@@ -2,4 +2,11 @@
Code for the website! Code for the website!
There is also code for the backend There is also code for the backend
## What to put:
- Brief description of what I am and what I do
- Ye also mostrar hobbies digital garden ashsgdhdgsgds
- Blog de algo