Skip to content

Commit 994f024

Browse files
Update deploy.yml
1 parent 14dcebf commit 994f024

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/deploy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ jobs:
1414
uses: actions/checkout@v3
1515

1616
- name: Build Docker image
17-
run: docker build -t your-dockerhub-username/yii2-app:latest .
17+
run: docker build -t ${{ secrets.DOCKER_USERNAME }}/yii2-app:latest .
1818

1919
- name: Login to DockerHub
2020
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
2121

2222
- name: Push image
23-
run: docker push your-dockerhub-username/yii2-app:latest
23+
run: docker push ${{ secrets.DOCKER_USERNAME }}/yii2-app:latest
2424

2525
- name: SSH & Deploy
2626
uses: appleboy/ssh-action@v1.0.0
@@ -29,5 +29,5 @@ jobs:
2929
username: ${{ secrets.EC2_USER }}
3030
key: ${{ secrets.EC2_SSH_KEY }}
3131
script: |
32-
docker pull your-dockerhub-username/yii2-app:latest
33-
docker service update --image your-dockerhub-username/yii2-app:latest yii2_app
32+
docker pull ${{ secrets.DOCKER_USERNAME }}/yii2-app:latest
33+
docker service update --image ${{ secrets.DOCKER_USERNAME }}/yii2-app:latest yii2_app

0 commit comments

Comments
 (0)