use node16 via nvm
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
Aravinth Manivannan 2023-10-21 14:06:04 +05:30
parent 3e2cc350be
commit a3c0e1022f
Signed by: realaravinth
GPG key ID: F8F50389936984FF

View file

@ -1,19 +1,18 @@
pipeline:
steps:
build:
image: python
environment:
- NVM_DIR="$HOME/.nvm"
when:
event: [ push, pull_request, tag, deployment ]
event: [push, pull_request, tag, deployment]
branch: master
commands:
- apt-get update
- apt-get install -y ca-certificates curl gnupg tar wget
- mkdir -p /etc/apt/keyrings
- curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
- echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
- apt-get -y install nodejs npm
- npm install --global yarn
- apt update && apt-get -y --no-install-recommends install nodejs tar gpg curl wget
- make env
- make
- make ci-deploy
secrets: [ FORGEJO_WRITE_DEPLOY_KEY, LIBREPAGES_DEPLOY_SECRET ]
- apt-get update
- apt update && apt-get -y --no-install-recommends install curl tar gnupg curl wget git
- curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
- source "$NVM_DIR/nvm.sh" && nvm install 16.20.2
- source "$NVM_DIR/nvm.sh" && nvm use 16.20.2
- source "$NVM_DIR/nvm.sh" && node install yarn
- source "$NVM_DIR/nvm.sh" && make env
- source "$NVM_DIR/nvm.sh" && make ci-deploy
secrets: [FORGEJO_WRITE_DEPLOY_KEY, LIBREPAGES_DEPLOY_SECRET]