ci: update bundle scripts to use `pnpm exec` + add openssh-client to ci docker image

This commit is contained in:
Yassine Doghri 2023-02-22 17:25:14 +00:00
parent e0c3ddb07d
commit 9ef58808fc
6 changed files with 11 additions and 14 deletions

View File

@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx --no-install commitlint --verbose --edit "$1"
pnpm exec commitlint --verbose --edit "$1"

View File

@ -7,5 +7,5 @@ INTERACTIVE="--no-interaction"
vendor/bin/captainhook $INTERACTIVE --configuration=captainhook.json --bootstrap=vendor/autoload.php hook:pre-commit "$@" <&0
npm run typecheck
npx lint-staged
pnpm run typecheck
pnpm exec lint-staged

View File

@ -17,7 +17,7 @@
[
"@semantic-release/exec",
{
"prepareCmd": "./scripts/bundle.sh ${nextRelease.version} && ./scripts/package.sh ${nextRelease.version} && npx prettier --write CHANGELOG.md"
"prepareCmd": "./scripts/bundle.sh ${nextRelease.version} && ./scripts/package.sh ${nextRelease.version} && pnpm exec prettier --write CHANGELOG.md"
}
],
"@semantic-release/npm",

View File

@ -19,6 +19,7 @@ RUN \
wget \
jq \
zip \
openssh-client \
rsync \
icu-libs \
mysql \

View File

@ -9,7 +9,7 @@ stages:
- cd docs
- chmod +x ./scripts/i18n-filter.sh
- ./scripts/i18n-filter.sh src
- npm ci
- pnpm install
cache:
paths:
@ -20,7 +20,7 @@ build:
extends: .documentation-setup
stage: build
script:
- npm run build
- pnpm run build
except:
- main
- beta
@ -33,7 +33,7 @@ build-production:
name: production
url: https://docs.castopod.org/
script:
- npm run build
- pnpm run build
artifacts:
paths:
- docs/.vitepress/dist
@ -56,10 +56,6 @@ deploy:
SSH_PORT: 3242
SOURCE_FOLDER: "docs/.vitepress/dist/"
before_script:
# install rsync for file transfers
- apt-get update && apt-get install rsync -y
# ssh config
- "which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )"
# Run ssh-agent (inside the build environment)
- eval $(ssh-agent -s)
# Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store

View File

@ -6,14 +6,14 @@ set -e
if [ "${CI_COMMIT_BEFORE_SHA}" = "0000000000000000000000000000000000000000" ];
then
echo "commitlint from HEAD^"
pnpx commitlint --from=HEAD^
pnpm exec commitlint --from=HEAD^
else
echo "commitlint from ${CI_COMMIT_BEFORE_SHA}"
br=`git branch -r --contains ${CI_COMMIT_BEFORE_SHA}`
if [ ! -n $br ];
then
pnpx commitlint --from=HEAD^
pnpm exec commitlint --from=HEAD^
else
pnpx commitlint --from="${CI_COMMIT_BEFORE_SHA}"
pnpm exec commitlint --from="${CI_COMMIT_BEFORE_SHA}"
fi
fi