Skip to content

Commit

Permalink
feat: Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
pminsung12 authored Mar 10, 2024
1 parent f62b10a commit 1c7ca7c
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,21 +96,21 @@ jobs:
docker pull ${{ env.DOCKER_IMAGE }}:latest
docker run -d -p 3000:3000 --name go_cicd1 --restart always ${{ env.DOCKER_IMAGE }}:latest
# 배포 Job - 서버 2
deploy-server2:
needs: build
name: Deploy to Server 2
runs-on: [ self-hosted, label-server2 ]
steps:
- name: Login to ghcr
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Docker run (Server 2)
run: |
docker stop go_cicd2 || true
docker rm go_cicd2 || true
docker pull ${{ env.DOCKER_IMAGE }}:latest
docker run -d -p 3000:3000 --name go_cicd2 --restart always ${{ env.DOCKER_IMAGE }}:latest
# # 배포 Job - 서버 2
# deploy-server2:
# needs: build
# name: Deploy to Server 2
# runs-on: [ self-hosted, label-server2 ]
# steps:
# - name: Login to ghcr
# uses: docker/login-action@v1
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GHCR_TOKEN }}
# - name: Docker run (Server 2)
# run: |
# docker stop go_cicd2 || true
# docker rm go_cicd2 || true
# docker pull ${{ env.DOCKER_IMAGE }}:latest
# docker run -d -p 3000:3000 --name go_cicd2 --restart always ${{ env.DOCKER_IMAGE }}:latest

0 comments on commit 1c7ca7c

Please sign in to comment.