Hi,
I tried to use drone pipeline. And type is ssh, to build web.
But an error happend. It shows npm and yarn not found.
On my server, I use nvm to choose npm version and to compile the frontend code.
does anyone knows how to use npm and yarn in drone pipeline ssh process ?
And how to use particular version of npm and yarn ?
---
kind: pipeline
type: ssh
name: default
workspace:
base: /home/deployer
path: solos_web_frontend
clone:
disable: true
server:
host: xxx.xxx.xxx.xxx
user: deployer
ssh_key:
from_secret: ssh_key
steps:
- name: frontend
commands:
- cd /home/deployer/solos_web_frontend
- git reset --hard
- git pull
- yarn
- yarn build
- echo $PASSWORD | sudo -S service nginx restart
when:
branch:
- dev2.0
environment:
PASSWORD:
from_secret: password
Thanks in advance.
Major