File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy a EC2
2+
3+ on :
4+ push :
5+ branches :
6+ - produccion
7+
8+ jobs :
9+ deploy :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Deploy via SSH
14+ uses : appleboy/ssh-action@v1.0.0
15+ with :
16+ host : ${{ secrets.EC2_HOST }}
17+ username : ${{ secrets.EC2_USER }}
18+ key : ${{ secrets.EC2_KEY }}
19+ script : |
20+ sudo systemctl start mysql || true
21+ sudo fuser -k 8080/tcp || true
22+ sudo fuser -k 80/tcp || true
23+
24+ cd "/home/ubuntu/Desktop/Proyecto/Proyecto"
25+ git pull origin produccion
26+
27+ cd "/home/ubuntu/Desktop/Proyecto/Proyecto/API (SpringBoot)/Proyecto/"
28+ chmod +x mvnw
29+ nohup ./mvnw spring-boot:run > /home/ubuntu/backend.log 2>&1 &
30+
31+ cd /home/ubuntu/Desktop/Proyecto/Proyecto/Frontend/
32+ sudo nohup php artisan serve --host=0.0.0.0 --port=80 > /home/ubuntu/frontend.log 2>&1 &
You can’t perform that action at this time.
0 commit comments