Skip to content

Commit 295cf6b

Browse files
committed
[Feat] CI
1 parent a4149dd commit 295cf6b

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Front Deployment
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build-and-push:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Build Docker image
15+
run: |
16+
docker build \
17+
--build-arg SPRING_PROFILES_ACTIVE=local \
18+
-f Dockerfile \
19+
-t ${{ vars.DOCKERHUB_USERNAME}}/erica-favicon-f:latest .
20+
- name: DockerHub login
21+
uses: docker/login-action@v2
22+
with:
23+
username: ${{ vars.DOCKERHUB_USERNAME}}
24+
password: ${{ vars.DOCKERHUB_PASSWORD}}
25+
26+
- name: Push Docker image
27+
run: docker push ${{ vars.DOCKERHUB_USERNAME}}/erica-favicon-f:latest

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM node
2+
WORKDIR /app
3+
COPY package.json .
4+
RUN npm install
5+
COPY . .
6+
CMD ["npm", "start"]

0 commit comments

Comments
 (0)