File tree Expand file tree Collapse file tree
API (SpringBoot)/Proyecto 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 &
Original file line number Diff line number Diff line change 11.env
22** /application.properties
33** /application- * .properties
4- * .pem
Original file line number Diff line number Diff line change 1+ distributionUrl =https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip
2+ wrapperUrl =https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
3+ ' EOF'
4+ distributionUrl =https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip
5+ wrapperUrl =https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments