Skip to content

Commit

Permalink
chore: front CD 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
parkmuhyeun authored Mar 3, 2024
1 parent 860633d commit 999df79
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/conceptbe-fe-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: conceptbe-fe-cd

on:
pull_request:
branches: [develop]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout source code.
uses: actions/checkout@v3

- name: Install dependencies
run: npm install

- name: Generate build
run: npm run build

- name: Docker Image Build
run: docker build -t pjhg410/conceptbe-fe .

- name: Docker Hub Login
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Docker Hub push
run: docker push pjhg410/conceptbe-fe

- name: Docker Pull And run
uses: appleboy/[email protected]
with:
host: ${{ secrets.WAS_HOST }}
username: ${{ secrets.WAS_USERNAME }}
password: ${{ secrets.WAS_PASSWORD }}
port: ${{ secrets.WAS_SSH_PORT }}
script: |
docker stop frontend
docker rm frontend
docker pull pjhg410/conceptbe-fe
docker run -d -p 3000:3000 --name frontend pjhg410/conceptbe-fe

0 comments on commit 999df79

Please sign in to comment.