diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 3f341af..cba37cd 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -41,11 +41,26 @@ jobs: - name: Compress build run: tar -czf build.tar.gz .output - - name: Deploy to server + - name: Deploy frontend to server run: | scp build.tar.gz deploy@${{ secrets.DEPLOY_HOST }}:/tmp/ ssh deploy@${{ secrets.DEPLOY_HOST }} << 'EOF' rm -rf /var/www/app/.output 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 EOF diff --git a/README.md b/README.md index ff522d1..876d0b7 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,11 @@ Code for the website! -There is also code for the backend \ No newline at end of file +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 +