Skip to content

Commit

Permalink
feat: Add github action to deploy main (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
karthik-sivadas authored Apr 15, 2024
1 parent a1c5357 commit 8cb7640
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/deploy-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy main

on:
push:
branches:
- main
paths:
- "ui/**"
- "server/**"

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up SSH key
env:
SSH_KEY_BASE64: ${{ secrets.SSH_KEY_BASE64 }}
run: |
echo "$SSH_KEY_BASE64" | base64 --decode > ${HOME}/multiwoven-deployments.pem
chmod 600 ${HOME}/multiwoven-deployments.pem
- name: Deploy main
env:
SSH_HOST: ${{ secrets.SSH_HOST }}
SSH_USER: ${{ secrets.SSH_USER }}
run: |
ssh -o StrictHostKeyChecking=no -i ${HOME}/multiwoven-deployments.pem $SSH_USER@$SSH_HOST << 'EOF'
cd multiwoven
git pull origin main
docker-compose down
docker-compose up -d --build
EOF

0 comments on commit 8cb7640

Please sign in to comment.