Skip to content

Commit a2f18f3

Browse files
committed
Deploy via semaphore
1 parent 69057e4 commit a2f18f3

3 files changed

Lines changed: 63 additions & 0 deletions

File tree

.semaphore/develop-deploy.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: v1.0
2+
name: develop-deploy
3+
agent:
4+
machine:
5+
type: f1-standard-4
6+
os_image: ubuntu2404
7+
blocks:
8+
- name: develop-deploy
9+
execution_time_limit:
10+
minutes: 10
11+
task:
12+
secrets:
13+
- name: mugshotbot
14+
jobs:
15+
- name: develop-deploy
16+
commands:
17+
- checkout --use-cache
18+
- git remote add dokku ssh://dokku@$HETZNER_IP_DEVELOP:22/html2img-server
19+
- chmod 600 /home/semaphore/.ssh/dokku
20+
- GIT_SSH_COMMAND="ssh -i /home/semaphore/.ssh/dokku -o StrictHostKeyChecking=no" git push dokku -f $SEMAPHORE_GIT_BRANCH:develop

.semaphore/main-deploy.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: v1.0
2+
name: main-deploy
3+
agent:
4+
machine:
5+
type: f1-standard-4
6+
os_image: ubuntu2404
7+
blocks:
8+
- name: main-deploy
9+
execution_time_limit:
10+
minutes: 10
11+
task:
12+
secrets:
13+
- name: mugshotbot
14+
jobs:
15+
- name: main-deploy
16+
commands:
17+
- checkout --use-cache
18+
- git remote add dokku ssh://dokku@$HETZNER_IP_MAIN:22/html2img-server
19+
- chmod 600 /home/semaphore/.ssh/dokku
20+
- GIT_SSH_COMMAND="ssh -i /home/semaphore/.ssh/dokku -o StrictHostKeyChecking=no" git push dokku -f $SEMAPHORE_GIT_BRANCH:main

.semaphore/semaphore.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
version: "v1.0"
2+
name: mugshotbot
3+
agent:
4+
machine:
5+
type: f1-standard-4
6+
os_image: ubuntu2404
7+
auto_cancel:
8+
running:
9+
when: "true"
10+
fail_fast:
11+
cancel:
12+
when: "branch != 'main'"
13+
promotions:
14+
- name: develop
15+
pipeline_file: develop-deploy.yml
16+
auto_promote:
17+
when: "true"
18+
deployment_target: develop
19+
- name: main
20+
pipeline_file: main-deploy.yml
21+
auto_promote:
22+
when: "true"
23+
deployment_target: main

0 commit comments

Comments
 (0)