yarn cache (node_modules) directory should already exist, so yarn install should be a noop.

This commit is contained in:
Jason Kulatunga 2023-01-26 02:45:33 -08:00
parent 0a5dd6af5a
commit 04c3c4d12a
2 changed files with 12 additions and 19 deletions

View File

@ -24,16 +24,15 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v2
# - name: "Populate frontend version information" - name: Set Node.js 18.x
# run: "cd webapp/frontend && ./git.version.sh" uses: actions/setup-node@v3
# - name: "Generate frontend & version information" with:
# uses: addnab/docker-run-action@v3 node-version: 18.x
# with: - name: Create Yarn Cache
# image: node:lts run: |
# options: -v ${{ github.workspace }}:/work cd frontend
# run: | yarn install --frozen-lockfile
# cd /work
# make binary-frontend && echo "print contents of /work/dist" && ls -alt /work/dist
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v2 uses: docker/setup-qemu-action@v2
with: with:

View File

@ -4,16 +4,10 @@
FROM node:18 as frontend-build FROM node:18 as frontend-build
ARG FASTEN_ENV=sandbox ARG FASTEN_ENV=sandbox
WORKDIR /usr/src/fastenhealth/frontend WORKDIR /usr/src/fastenhealth/frontend
COPY frontend/package.json frontend/yarn.lock ./
RUN yarn --version && \
yarn config delete proxy && \
yarn config delete https-proxy && \
yarn config set registry 'http://registry.npmjs.org' && \
yarn config list && \
yarn install
COPY frontend/ ./ COPY frontend/ ./
RUN yarn run build -- --configuration ${FASTEN_ENV} --output-path=../dist
RUN yarn install --frozen-lockfile && \
yarn run build -- --configuration ${FASTEN_ENV} --output-path=../dist
######################################################################################################### #########################################################################################################
# Backend Build # Backend Build