-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (35 loc) · 1.13 KB
/
conceptbe-fe-cd.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: conceptbe-fe-cd
on:
push:
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