-
-
Notifications
You must be signed in to change notification settings - Fork 17
27 lines (25 loc) · 691 Bytes
/
deploy.yaml
File metadata and controls
27 lines (25 loc) · 691 Bytes
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
name: Deploy
on:
workflow_run:
workflows: ["Create and publish a Docker image"]
branches: [main]
types:
- completed
jobs:
deploy:
name: Deploy bot
runs-on: ubuntu-latest
steps:
- name: Remote deploy
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.SSH_PORT }}
script: |
cd ~/mystbin
git reset --hard HEAD || true
git pull origin main
docker compose --profile redis pull
docker compose --profile redis up --build -d mystbin
username: ${{ secrets.SSH_USER }}