Skip to content

Commit

Permalink
feat: use pnpm from corepack to install dependency
Browse files Browse the repository at this point in the history
Since package.json already has the packageManager field specified
with pnpm and its specific version, there is no reason not to use
it during whole dev/build process.
  • Loading branch information
OrkWard committed Jan 3, 2025
1 parent 2152916 commit 8cd7772
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4,001 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,8 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: '20'

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 8
run_install: false
- name: Enable corepack
run: corepack enable

- name: Get pnpm store directory
shell: bash
Expand Down
10 changes: 3 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
FROM python:3.10.5-slim AS develop-py
WORKDIR /root/running_page
COPY ./requirements.txt /root/running_page/requirements.txt
# Add proxy for apt.
# ENV http_proxy http://ip_address:port
# ENV https_proxy http://ip_address:port
RUN apt-get update \
&& apt-get install -y --no-install-recommends git \
&& apt-get purge -y --auto-remove \
Expand All @@ -17,10 +14,9 @@ FROM node:18 AS develop-node
WORKDIR /root/running_page
COPY ./package.json /root/running_page/package.json
COPY ./pnpm-lock.yaml /root/running_page/pnpm-lock.yaml
RUN npm config rm proxy&&npm config set registry https://registry.npmjs.org/ \
&&npm install -g corepack \
&&corepack enable \
&&pnpm install
RUN npm config set registry https://registry.npmjs.org/ \
&& corepack enable \
&& pnpm install

FROM develop-py AS data
ARG app
Expand Down
Loading

0 comments on commit 8cd7772

Please sign in to comment.