Skip to content

Commit 0f82e46

Browse files
authored
config: start services workflow 추가
1 parent 9c0fb3b commit 0f82e46

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Start services
2+
3+
run-name: Start containers in cloud service by ${{ github.actor }}
4+
5+
on:
6+
workflow_run:
7+
workflows: [Copy Compose]
8+
types:
9+
- completed
10+
11+
jobs:
12+
start-services:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Connect to cloud server
16+
uses: appleboy/ssh-action@v1.2.2
17+
with:
18+
host: ${{secrets.CLOUD_HOST}}
19+
username: ${{secrets.CLOUD_USERNAME}}
20+
key: ${{secrets.CLOUD_SECRET_KEY}}
21+
port: ${{secrets.CLOUD_PORT}}
22+
script: |
23+
cd ~
24+
sudo docker compose down --volumes
25+
sudo docker container prune -f
26+
sudo docker image prune -a -f
27+
sudo docker compose up -d

0 commit comments

Comments
 (0)