Skip to content

Commit

Permalink
fix: workflow job 통합 #3
Browse files Browse the repository at this point in the history
  • Loading branch information
wjdtkdgns committed Nov 20, 2023
1 parent 247fb62 commit 261c54e
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/Deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@ jobs:
docker build -t $DOCKERHUB_USERNAME/$DOCKERHUB_IMAGE_NAME:${{env.IMAGE_TAG}} .
docker push $DOCKERHUB_USERNAME/$DOCKERHUB_IMAGE_NAME:${{env.IMAGE_TAG}}
deploy:
needs: build_and_push
runs-on: ubuntu-latest
steps:
- name: Set image tag from Output
run: echo "IMAGE_TAG=${{ needs.build_and_push.outputs.image_tag }}" >> $GITHUB_ENV

- name: Get Public IP
id: publicip
run: |
Expand Down Expand Up @@ -92,7 +85,7 @@ jobs:
sudo docker pull $DOCKERHUB_USERNAME/$DOCKERHUB_IMAGE_NAME:${{env.IMAGE_TAG}}
sudo docker pull $DOCKERHUB_USERNAME/susu-nginx:0.0.1
sudo docker run --restart unless-stopped --name server --hostname server --env-file ~/susu/.env -e TZ=Asia/Seoul --expose 8080 --log-driver=awslogs --log-opt awslogs-group=susu --log-opt awslogs-region=ap-northeast-2 --log-opt awslogs-stream=server $DOCKERHUB_USERNAME/$DOCKERHUB_IMAGE_NAME:${{env.IMAGE_TAG}} -d
sudo docker run --name nginx --restart always -p 80:80 --depends-on server $DOCKERHUB_USERNAME/susu-nginx:0.0.1 -d
sudo docker run --name nginx --restart always -p 80:80 $DOCKERHUB_USERNAME/susu-nginx:0.0.1 -d
sudo docker system prune --all -f
Expand Down

0 comments on commit 261c54e

Please sign in to comment.