Skip to content

Commit

Permalink
main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Szotkowski committed Jul 23, 2023
1 parent 450ffd3 commit f833ddb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ jobs:
chmod 600 ~/.ssh/known_hosts
echo "${{ secrets.KNOWN_HOSTS }}" > ~/.ssh/known_hosts
- name: connect and pull
run: ssh -i ~/.ssh/id_rsa -o UserKnownHostsFile=~/.ssh/known_hosts -tt ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} -p ${{ secrets.SSH_PORT }} "cd ${{ secrets.WORK_DIR }}-${{ env.DEPLOY_DIR }} && git checkout ${{ env.DEPLOY_DIR }} --force && git pull --force && docker build -t backend-${{ env.DEPLOY_DIR }} . && docker kill backend-${{ env.DEPLOY_DIR }} && docker rm backend-${{ env.DEPLOY_DIR }} && docker run --name backend-${{ env.DEPLOY_DIR }} -v /etc/letsencrypt/live/backend.selecro.cz:/app/certificates -dp ${{ env.PORT }}:${{ env.PORT }} -p ${{ env.SECOND_PORT }}:${{ env.SECOND_PORT }} backend-${{ env.DEPLOY_DIR }} && docker update --restart unless-stopped backend-${{ env.DEPLOY_DIR }} && exit"
run: ssh -i ~/.ssh/id_rsa -o UserKnownHostsFile=~/.ssh/known_hosts -tt ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} -p ${{ secrets.SSH_PORT }} "cd ${{ secrets.WORK_DIR }}-${{ env.DEPLOY_DIR }} && git checkout ${{ env.DEPLOY_DIR }} --force && git pull --force && docker build -t backend-${{ env.DEPLOY_DIR }} . && docker kill backend-${{ env.DEPLOY_DIR }} && docker rm backend-${{ env.DEPLOY_DIR }} && docker run --name backend-${{ env.DEPLOY_DIR }} -dp ${{ env.PORT }}:${{ env.PORT }} -p ${{ env.SECOND_PORT }}:${{ env.SECOND_PORT }} backend-${{ env.DEPLOY_DIR }} && docker update --restart unless-stopped backend-${{ env.DEPLOY_DIR }} && exit"
- name: cleanup
run: rm -rf ~/.ssh

0 comments on commit f833ddb

Please sign in to comment.