-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (33 loc) · 1017 Bytes
/
deploy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Deploy to dev-m1sk9-s1
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Tailscale
uses: tailscale/github-action@v2
with:
oauth-client-id: ${{ secrets.TAILSCALE_OAUTH_CLIENT_ID }}
oauth-secret: ${{ secrets.TAILSCALE_OAUTH_SECRET }}
tags: tag:ci
- name: Deploy compose to dev-m1sk9-s1
uses: appleboy/ssh-action@v1.1.0
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: ${{ secrets.SSH_PORT }}
script: |
cd compose
git pull origin main
for dir in (find . -name 'compose.yaml' -exec dirname {} \;)
echo "Running docker compose in $dir"
cd $dir
docker compose up -d --force-recreate --build
cd -
end