Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
patthapolkit committed Jul 2, 2024
1 parent 9e89100 commit 05df103
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: ssh to server
- name: SSH and deploy
env:
PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
HOSTNAME: ${{ secrets.SSH_HOST }}
USER_NAME: ${{ secrets.USER_NAME }}
run: |
echo "$PRIVATE_KEY" > key && chmod 600 key
ssh -o StrictHostKeyChecking=no -i key ${USER_NAME}@${HOSTNAME} '
ssh -i key ${USER_NAME}@${HOSTNAME} '
docker pull ${{ vars.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}:${{ github.ref_name }}
docker stop ${{ github.event.repository.name }} || true
Expand Down

0 comments on commit 05df103

Please sign in to comment.