Skip to content

Commit 4682972

Browse files
committed
feat: add workflow for demo to update automatically on push to main
1 parent 9212730 commit 4682972

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/demo-push-main.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Demo Build & Push
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'docker/demo/**'
8+
- 'scripts/**'
9+
- 'services/**'
10+
- docker-compose.yml
11+
- balena.yml
12+
13+
jobs:
14+
build_and_push:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout the repo
18+
uses: actions/checkout@v2
19+
- name: Deploy Stack
20+
uses: appleboy/ssh-action@master
21+
with:
22+
host: ${{ secrets.SSH_HOST }}
23+
username: ${{ secrets.SSH_USERNAME }}
24+
key: ${{ secrets.SSH_SECRET }}
25+
port: ${{ secrets.SSH_PORT }}
26+
script: |
27+
cd /srv/edt-offline
28+
git pull origin main
29+
docker compose -f docker/demo up -d --build

0 commit comments

Comments
 (0)