Skip to content

Commit 2a8ab6e

Browse files
committed
More compose
1 parent f92b90e commit 2a8ab6e

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

.github/workflows/deploy.yaml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,23 @@ jobs:
1818
with:
1919
ssh-private-key: ${{ secrets.DEPLOY_SSH_KEY }}
2020

21+
- name: Add host
22+
run: |
23+
ssh-keyscan zenful.cloud > /root/.ssh/known_hosts
24+
2125
- name: Set up Docker Compose
2226
run: |
2327
# Install Docker Compose
2428
curl -L "https://github.com/docker/compose/releases/download/v2.19.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
2529
chmod +x /usr/local/bin/docker-compose
2630
27-
- name: Copy over the docker compose file
31+
- name: Run Docker Compose
2832
run: |
29-
scp -o StrictHostKeyChecking=no compose.prod.yaml deploytest@zenful.cloud:guestbook/compose.yaml
30-
- name: Deploy code via SSH
31-
run: |
32-
ssh -o StrictHostKeyChecking=no deploytest@zenful.cloud "cd guestbook && docker compose up -d"
33+
DOCKER_HOST=ssh://deploytest@zenful.cloud docker-compose -f ./compose.prod.yaml up -d
34+
35+
# - name: Copy over the docker compose file
36+
# run: |
37+
# scp -o StrictHostKeyChecking=no compose.prod.yaml deploytest@zenful.cloud:guestbook/compose.yaml
38+
# - name: Deploy code via SSH
39+
# run: |
40+
# ssh -o StrictHostKeyChecking=no deploytest@zenful.cloud "cd guestbook && docker compose up -d"

0 commit comments

Comments
 (0)