Skip to content

Commit 85badef

Browse files
committed
add runner
1 parent 1fcb1c2 commit 85badef

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Deploy Docker
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
7+
jobs:
8+
deploy:
9+
runs-on: self-hosted
10+
11+
steps:
12+
- name: Deploy on server
13+
run: |
14+
set -e
15+
16+
echo "Go to app folder"
17+
cd /opt/apps/lazybot
18+
19+
echo "Pull latest code"
20+
git pull origin main
21+
22+
echo "Build & restart containers"
23+
docker compose down || true
24+
docker compose build
25+
docker compose up -d
26+
27+
echo "Deploy finished"

0 commit comments

Comments
 (0)