Skip to content

Commit

Permalink
Merge pull request #51 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 d904345 + c8c3f07 commit fec897e
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,15 @@ jobs:
docker-compose -f docker-compose.yml build
docker-compose -f docker-compose.yml push
- name: Configure SSH
uses: webfactory/ssh-agent@v0.5.3
with:
ssh-private-key: ${{ secrets.SSH_KEY }}
- name: Install sshpass
run: sudo apt-get install -y sshpass

- name: Configure SSH key
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -t rsa ${{ secrets.SERVER_HOST }} >> ~/.ssh/known_hosts
- name: Copy docker-compose.yml to server
run: scp -o StrictHostKeyChecking=no -P ${{ secrets.SERVER_PORT }} docker-compose.yml ${{ secrets.SERVER_USERNAME }}@${{ secrets.SERVER_HOST }}:${{ secrets.SERVER_PATH }}/docker-compose.yml
Expand Down

0 comments on commit fec897e

Please sign in to comment.