Skip to content

Commit 8cb7640

Browse files
feat: Add github action to deploy main (#44)
1 parent a1c5357 commit 8cb7640

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/deploy-main.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Deploy main
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- "ui/**"
9+
- "server/**"
10+
11+
jobs:
12+
deploy:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v2
17+
18+
- name: Set up SSH key
19+
env:
20+
SSH_KEY_BASE64: ${{ secrets.SSH_KEY_BASE64 }}
21+
run: |
22+
echo "$SSH_KEY_BASE64" | base64 --decode > ${HOME}/multiwoven-deployments.pem
23+
chmod 600 ${HOME}/multiwoven-deployments.pem
24+
25+
- name: Deploy main
26+
env:
27+
SSH_HOST: ${{ secrets.SSH_HOST }}
28+
SSH_USER: ${{ secrets.SSH_USER }}
29+
run: |
30+
ssh -o StrictHostKeyChecking=no -i ${HOME}/multiwoven-deployments.pem $SSH_USER@$SSH_HOST << 'EOF'
31+
cd multiwoven
32+
git pull origin main
33+
docker-compose down
34+
docker-compose up -d --build
35+
EOF

0 commit comments

Comments
 (0)