Linux部署前端指令碼

2021-10-21 14:51:38 字數 367 閱讀 7547

在沒有自動化部署的情況下,每次提交完**,都要在伺服器上拉**,然後build,很麻煩,這裡寫了乙個小指令碼完成拉**,build,實時列印log的功能,命名為run.sh,每次上傳**後,進入到指定的資料夾直接./run.sh就可以了。

指令碼

echo

"*****= when build complete,press ctrl+c to exit the log console*****="

git pull

sudo npm run build > frontend.log &

tail -f frontend.log

linux部署前端

1.編輯指令碼nginx.conf usr local nginx conf conf.d conf server error page 404 404.html redirect server error pages to the static page 50x.html error page 5...

前端部署指令碼樣例

適應場景 前端包內含有內層資料夾如dataserver web 引數要求 service path為前端元件的上層目錄,如 web,不要具體到每個前端元件的資料夾。service name為web下每個前端包解壓後的子資料夾名,如dataserver web 內容說明 指令碼中選取的包型別為zip,...

前端部署基本linux命令

mkdir 資料夾名稱 建立資料夾 rm r 資料夾名稱 刪除資料夾 sudo chmod 777 r 資料夾名稱 設定許可權 在當前檔案下到拷貝檔案到另乙個資料夾中,示例 cp r release v2.9 將當前所有檔案拷貝到v2.9資料夾中 cp rrf 需要拷貝到哪個資料夾中 路徑 相對路徑...