Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: front CD 추가 #46

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading