Skip to content

Commit

Permalink
run yarn build in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
benoitquette committed Dec 27, 2023
1 parent 443bf67 commit 1590779
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v4

- name: Use Node.js 16
uses: actions/setup-node@v2-beta
with:
node-version: '16'

- name: Build Project
run: |
yarn
yarn build
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
Expand Down
15 changes: 5 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
FROM node:20.10-alpine3.19
ENV appDir /usr/src/app
ENV appDir /usr/app

# use changes to package.json to force Docker not to use the cache
# when we change our application's nodejs dependencies:
ADD package.json yarn.lock /tmp/
RUN cd /tmp && yarn install
RUN mkdir -p ${appDir} && cp -a /tmp/node_modules ${appDir}/

# From here we load our application's code in, therefore the previous docker
# "layer" thats been cached will be used if possible
COPY express ${appDir}/express
WORKDIR ${appDir}
COPY . ${appDir}
RUN yarn build
# VOLUME ${appDir}/config

# add webpack generated files
COPY express ${appDir}/express

EXPOSE 5000
WORKDIR ${appDir}/express
CMD ["node", "server.js"]

0 comments on commit 1590779

Please sign in to comment.