Skip to content

Commit fb76508

Browse files
remove volume and update action
1 parent 2547096 commit fb76508

File tree

2 files changed

+18
-20
lines changed

2 files changed

+18
-20
lines changed

.github/workflows/main.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: Deploy
22

3-
# Controls when the action will run.
3+
# Controls when the action will run.
44
on:
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
1010
jobs:
@@ -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

Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
FROM httpd:2.4
22

33
COPY ./app/ /usr/local/apache2/htdocs/
4-
5-
VOLUME ./app /usr/local/apache2/htdocs

0 commit comments

Comments
 (0)