Skip to content

Commit 767ed36

Browse files
committed
fix deployment
fix deployment fix deployment fix deployment fix deployment
1 parent 23800f6 commit 767ed36

3 files changed

Lines changed: 30 additions & 49 deletions

File tree

.github/workflows/build-docker-and-deploy-to-dev.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,18 @@ jobs:
3131
- name: Docker Push Tag
3232
run: docker push remotemobprogramming/mob-timer:${{ github.sha }}
3333
deployment:
34-
uses: remotemobprogramming/timer/.github/workflows/testname.yml@main
35-
with:
36-
domain: dev.timer.mob.sh
37-
tag: ${{ github.sha }}
38-
secrets:
39-
SSH_HOST: ${{ secrets.SSH_HOST_DEV }}
40-
SSH_USERNAME: ${{ secrets.SSH_USERNAME }}
41-
SSH_KEY: ${{ secrets.SSH_KEY }}
34+
needs: dockerbuild
35+
environment: development
36+
concurrency: development
37+
runs-on: ubuntu-latest
38+
steps:
39+
- name: deploy
40+
uses: appleboy/ssh-action@v0.1.5
41+
with:
42+
host: ${{ secrets.SSH_HOST_DEV }}
43+
username: ${{ secrets.SSH_USERNAME }}
44+
key: ${{ secrets.SSH_KEY }}
45+
script: |
46+
docker stop mobtimer
47+
docker rm mobtimer
48+
docker run -d -e VIRTUAL_HOST=dev.timer.mob.sh -e LETSENCRYPT_HOST=dev.timer.mob.sh -e LETSENCRYPT_EMAIL=team@mob.sh -e PORT=80 --expose 80 --network=proxy --pull always --name mobtimer remotemobprogramming/mob-timer:${{ github.sha }}

.github/workflows/release.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,18 @@ on:
44
name: Release
55
jobs:
66
deployment:
7-
uses: remotemobprogramming/timer/.github/workflows/deployment.yml@main
8-
with:
9-
domain: timer.mob.sh
10-
tag: ${{ github.sha }}
11-
secrets:
12-
SSH_HOST: ${{ secrets.SSH_HOST_PROD }}
13-
SSH_USERNAME: ${{ secrets.SSH_USERNAME }}
14-
SSH_KEY: ${{ secrets.SSH_KEY }}
7+
needs: dockerbuild
8+
environment: production
9+
concurrency: production
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: deploy
13+
uses: appleboy/ssh-action@v0.1.5
14+
with:
15+
host: ${{ secrets.SSH_HOST_PROD }}
16+
username: ${{ secrets.SSH_USERNAME }}
17+
key: ${{ secrets.SSH_KEY }}
18+
script: |
19+
docker stop mobtimer
20+
docker rm mobtimer
21+
docker run -d -e VIRTUAL_HOST=timer.mob.sh -e LETSENCRYPT_HOST=timer.mob.sh -e LETSENCRYPT_EMAIL=team@mob.sh -e PORT=80 --expose 80 --network=proxy --pull always --name mobtimer remotemobprogramming/mob-timer:${{ github.sha }}

.github/workflows/testname.yml

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

0 commit comments

Comments
 (0)