Skip to content

Commit

Permalink
fix: deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ONEPANTSU authored Mar 7, 2024
1 parent f314701 commit 3de20b8
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,14 @@ jobs:
echo "$SSH_PRIVATE_KEY" > ../private.key
sudo chmod 600 ../private.key
echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
echo "${{ secrets.SSH_PASSPHRASE }}" | ssh-agent bash -c "ssh-add ../private.key; ssh -o StrictHostKeyChecking=no -tt ${{ env.SERVER_USER }}@${{ env.SERVER_HOST }}"
cd ${{ env.SERVER_PATH }} && docker-compose down || mkdir ${{ env.SERVER_PATH }} && cd ${{ env.SERVER_PATH }} && git clone https://github.com/SoftBananas/teamapp-backend.git
git pull
docker-compose up -d
exit
echo "${{ secrets.SSH_PASSPHRASE }}" | ssh-agent bash -c "\
ssh-add ../private.key; ssh -o StrictHostKeyChecking=no -tt ${{ env.SERVER_USER }}@${{ env.SERVER_HOST }} '\
cd ${{ env.SERVER_PATH }} && docker-compose down || \
mkdir ${{ env.SERVER_PATH }} && cd ${{ env.SERVER_PATH }} && git clone https://github.com/SoftBananas/teamapp-backend.git;
git pull;
docker-compose up -d; \
exit'"
shell: bash
env:
SSH_PRIVATE_KEY: ${{secrets.SSH_KEY}}
Expand Down

0 comments on commit 3de20b8

Please sign in to comment.