Skip to content

Commit

Permalink
Merge pull request #50 from SoftBananas/ci-cd
Browse files Browse the repository at this point in the history
fix: deploy
  • Loading branch information
ONEPANTSU authored Mar 5, 2024
2 parents 5722735 + b924817 commit d904345
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ jobs:
docker-compose -f docker-compose.yml build
docker-compose -f docker-compose.yml push
- name: Install sshpass
run: sudo apt-get install -y sshpass
- name: Configure SSH
uses: webfactory/ssh-agent@v0.5.3
with:
ssh-private-key: ${{ secrets.SSH_KEY }}

- name: Copy docker-compose.yml to server
run: scp -P ${{ secrets.SERVER_PORT }} docker-compose.yml ${{ secrets.SERVER_USERNAME }}@${{ secrets.SERVER_HOST }}:${{ secrets.SERVER_PATH }}/docker-compose.yml
run: scp -o StrictHostKeyChecking=no -P ${{ secrets.SERVER_PORT }} docker-compose.yml ${{ secrets.SERVER_USERNAME }}@${{ secrets.SERVER_HOST }}:${{ secrets.SERVER_PATH }}/docker-compose.yml

- name: Deploy to server
run: |
sshpass -p ${{ secrets.SERVER_PASSWORD }} ssh -p ${{ secrets.SERVER_PORT }} ${{ secrets.SERVER_USERNAME }}@${{ secrets.SERVER_HOST }} "cd ${{ secrets.SERVER_PATH }}/ && docker-compose up -d"
sshpass -p ${{ secrets.SERVER_PASSWORD }} ssh -o StrictHostKeyChecking=no -p ${{ secrets.SERVER_PORT }} ${{ secrets.SERVER_USERNAME }}@${{ secrets.SERVER_HOST }} "cd ${{ secrets.SERVER_PATH }} && docker-compose up -d"
10 changes: 0 additions & 10 deletions scrpts/deploy.sh

This file was deleted.

0 comments on commit d904345

Please sign in to comment.