Skip to content

Commit

Permalink
run build in github action
Browse files Browse the repository at this point in the history
  • Loading branch information
tanguyenvn committed Jul 5, 2024
1 parent 5b6eabe commit 5061e1f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,18 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set up node
uses: actions/setup-node@v4
with:
node-version: "20.x"
cache: "npm"

- name: Install dependencies
run: npm install

- name: Build
run: npm run build

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
Expand Down
14 changes: 4 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
FROM node:20-alpine

ENV NODE_OPTIONS --max-old-space-size=4096

WORKDIR /app

COPY package*.json ./

ENV NODE_OPTIONS --max-old-space-size=4096

RUN apk add --no-cache --virtual .gyp \
python3 \
make \
g++ \
&& npm ci && apk del .gyp

COPY . .
RUN npm install --omit=dev --ignore-scripts

RUN npm run build
COPY dist ./dist

EXPOSE 5051

Expand Down

0 comments on commit 5061e1f

Please sign in to comment.