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

View File

@ -4,16 +4,10 @@
FROM node:18 as frontend-build
ARG FASTEN_ENV=sandbox
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/ ./
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