Skip to content

Commit

Permalink
www: remove production and add shallow clone (#3356)
Browse files Browse the repository at this point in the history
Removes the outdated/deprecated `--production` flag and adds `--prefer-online`. 
Make the install based on the lockfile by using `npm ci` instead of `npm install`.

Also make the clone process shallow as we don't need the git history here.
We make a depth of 2 as Nextra/Next.js requires that.
  • Loading branch information
ovflowd committed May 18, 2023
1 parent 1ba2d52 commit 45189aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ansible/www-standalone/resources/scripts/build-site.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ clonedir=/home/www/github/${site}

if [ ! -d "${clonedir}" ]; then
repo="${site}.org"
git clone https://github.com/nodejs/${repo}.git $clonedir
git clone --depth 2 https://github.com/nodejs/${repo}.git $clonedir
fi

if [ "$site" == "nodejs" ]; then
Expand Down Expand Up @@ -51,7 +51,7 @@ docker run \
npm config set loglevel http && \
npm config set cache /npm/ && \
cd /website/ && \
npm install --cache-min 1440 --production && \
npm ci && \
$build_cmd \
' \
"
Expand Down

0 comments on commit 45189aa

Please sign in to comment.