doc: install nodejs and curl before execution of npm

This commit is contained in:
Leon Xu committed 2021-08-26 23:47:29 -07:00
1 parent db8db0f66d
commit 3f5bb8f705
1 file changed
+11 -16
+11 -16
View File
@@ -44,22 +44,17 @@ If I want GitLab CI/CD to deploy my website each time that I push to GitLab, I c
<br>
```yaml
build website:
stage: build
# Using the latest of ubuntu image
image: ubuntu:latest
cache:
paths:
- node_modules/ # Node modules and dependencies
before_script:
- apt-get update -qy # Check for update
- apt-get install -y lftp # Install lftp
- npm install -g hexo-cli # Install Hexo itself
- npm install # Install Hexo modules and dependencies
- npm install hexo-renderer-pug # Install Butterfly pug
- npm install hexo-renderer-stylus # Install stylus renderer
image: ubuntu:latest
before_script:
- apt update -qy # Check for update
- apt install -y lftp # Install lftp
- apt install curl # Install curl
- curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash -
- apt install nodejs # Install NodeJS
- npm install -g hexo-cli # Install Hexo itself
- npm install # Install Hexo modules and dependencies
- npm install hexo-renderer-pug # Install Butterfly pug
- npm install hexo-renderer-stylus # Install stylus renderer
deploy via lftp:
stage: deploy