Skip to content

Commit a950bed

Browse files
authored
Merge branch 'produccion' into desarrollo
2 parents 9194b98 + 95bc403 commit a950bed

6 files changed

Lines changed: 37 additions & 83 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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 &

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
.env
22
**/application.properties
33
**/application-*.properties
4-
*.pem
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
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

API (SpringBoot)/Proyecto/mvnw

100644100755
File mode changed.

API (SpringBoot)/Proyecto/src/main/resources/application.properties

Lines changed: 0 additions & 19 deletions
This file was deleted.

Frontend/.env

Lines changed: 0 additions & 63 deletions
This file was deleted.

0 commit comments

Comments
 (0)