1、系統管理-》插件管理-》
查找nodejs插件安裝
2、系統管理-》全局工具配置
3、系統管理-》系統設置
(需要在gitlab上把上傳文件服務器的公鑰填到SSH keys裏面)
具體gitlab路徑在右上角設置裏面
4、點擊新建任務創建一個
5、填寫gitlab地址和用戶密碼
6、勾選Provide Node & npm bin/ folder to PATH
7、執行構建腳本
8、將打包內容上傳到nginx
9、配置nginx
location / {
try_files $uri $uri/ @router;
index index.html;
# root html;
root /aifs01/tools/nginx/html/;
}
10、然後輸入ip:port/index.html即可訪問頁面