File tree Expand file tree Collapse file tree 2 files changed +18
-20
lines changed
Expand file tree Collapse file tree 2 files changed +18
-20
lines changed Original file line number Diff line number Diff line change 11name : Deploy
22
3- # Controls when the action will run.
3+ # Controls when the action will run.
44on :
55 # Triggers the workflow on push or pull request events but only for the master branch
66 push :
7- branches : [ main ]
7+ branches : [main]
88
99# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1010jobs :
@@ -14,19 +14,19 @@ jobs:
1414 runs-on : ubuntu-latest
1515
1616 # Steps represent a sequence of tasks that will be executed as part of the job
17- steps :
18- - name : Deploy using ssh
19- uses : appleboy/ssh-action@master
20- with :
21- host : ${{ secrets.HOST }}
22- username : ${{ secrets.USERNAME }}
23- key : ${{ secrets.SSH_PRIVATE_KEY }}
24- port : 22
25- script : |
26- cd /home/proyecto/BIXA/
27- git pull origin main
28- git status
29- docker stop bixa
30- docker rm bixa
31- docker build -t bixa-image .
32- docker run -d -it -p 5002:80 --restart unless-stopped --name bixa bixa-image
17+ steps :
18+ - name : Deploy using ssh
19+ uses : appleboy/ssh-action@master
20+ with :
21+ host : ${{ secrets.HOST }}
22+ username : ${{ secrets.USERNAME }}
23+ key : ${{ secrets.SSH_PRIVATE_KEY }}
24+ port : 22
25+ script : |
26+ cd /home/proyecto/BIXA/
27+ git pull origin main
28+ git status
29+ docker build -t bixa-image . || { echo "Docker build failed"; exit 1; }
30+ docker stop bixa
31+ docker rm bixa
32+ docker run -d -it -p 5002:80 --restart unless-stopped --name bixa bixa-image
Original file line number Diff line number Diff line change 11FROM httpd:2.4
22
33COPY ./app/ /usr/local/apache2/htdocs/
4-
5- VOLUME ./app /usr/local/apache2/htdocs
You can’t perform that action at this time.
0 commit comments