Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
chronis10 committed May 12, 2024
2 parents dec2e83 + 6bb5d41 commit 454eb07
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Deploy to SSH Server

on:
workflow_dispatch:

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

- name: Install SSH key
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
- name: SSH and Deploy
run: |
ssh -i ~/.ssh/id_rsa ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }}
cd /home/christoclis/fossbot-platform
git pull origin master
sudo docker compose -f docker-compose-production.yml down
sudo docker compose -f docker-compose-production.yml build
sudo docker compose -f docker-compose-production.yml up -d

0 comments on commit 454eb07

Please sign in to comment.