Skip to content

Commit 3ff0a22

Browse files
committed
fix: fix github action
1 parent eb3a003 commit 3ff0a22

1 file changed

Lines changed: 12 additions & 18 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,17 @@
1-
name: Deploy INYS
1+
name: Deploy to VPS
22

33
on:
44
push:
55
branches:
66
- main
7-
- frontend
87

98
jobs:
109
build:
1110
runs-on: ubuntu-latest
12-
environment: production
13-
1411
steps:
1512
- name: Checkout repository
1613
uses: actions/checkout@v3
1714

18-
- name: Set up Docker Buildx
19-
uses: docker/setup-buildx-action@v2
20-
2115
- name: Log in to Docker Hub
2216
uses: docker/login-action@v2
2317
with:
@@ -29,23 +23,23 @@ jobs:
2923
with:
3024
context: .
3125
push: true
32-
tags: ${{ secrets.DOCKER_USERNAME }}/inys-frontend:latest
33-
26+
tags: ${{secrets.DOCKER_USERNAME}}/${{github.event.repository.name}}:latest
3427
deploy:
3528
runs-on: ubuntu-latest
3629
needs: build
37-
environment: production
38-
3930
steps:
31+
- name: Checkout repository
32+
uses: actions/checkout@v3
33+
4034
- name: Deploy on VPS
4135
uses: appleboy/ssh-action@v0.1.10
4236
with:
43-
host: ${{ secrets.HOST }}
44-
username: ${{ secrets.USERNAME }}
45-
password: ${{ secrets.PASSWORD }}
46-
port: ${{ secrets.PORT }}
37+
host: ${{ secrets.VPS_1_HOST_IP }}
38+
username: ${{ secrets.VPS_1_HOST_USERNAME }}
39+
password: ${{ secrets.VPS_1_HOST_PASSWORD }}
40+
port: ${{ secrets.VPS_1_HOST_PORT }}
4741
script: |
48-
cd /var/www/inys-frontend
42+
cd /media/${{github.event.repository.name}}
4943
docker compose pull
50-
docker compose down || true
51-
docker compose up -d
44+
docker compose down
45+
docker compose up -d

0 commit comments

Comments
 (0)