Skip to content

Commit d41567a

Browse files
authored
Update docker-image.yml
1 parent 8fb55ff commit d41567a

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/docker-image.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ jobs:
2929
docker tag lidorlg/lidor-python-sce:$(date +%F)-${{ github.run_number }} lidorlg/lidor-python-sce:latest
3030
docker push lidorlg/lidor-python-sce:latest
3131
deploy-docker:
32+
needs:
33+
- build-docker
3234
runs-on: ubuntu-latest
3335
steps:
3436
- name: SSH to Azure Server
@@ -43,6 +45,6 @@ jobs:
4345
# The public host key of the remote server to prevent MITM attacks. (Use GitHub secrets!)
4446
known_hosts: ${{ secrets.PUB_KEY }}
4547
# Multiline block of commands to run before the SCP transfer.
46-
first_ssh: echo "hello" # optional
48+
first_ssh: sudo docker stop lidor-python && sudo docker rm lidor-python
4749

48-
last_ssh: ls / # optional
50+
last_ssh: sudo docker run -d --name lidor-python -p 80:8080 lidor-python-sce:$(date +%F)-${{ github.run_number }}

0 commit comments

Comments
 (0)