Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gitlab-ci-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PublicSource
gitlab-ci-template
Commits
1af43f97
Commit
1af43f97
authored
Sep 01, 2023
by
张涵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update pnpm params position
parent
704a790d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
.gitlab-ci-vue-qmai-runner2.yml
.gitlab-ci-vue-qmai-runner2.yml
+5
-6
No files found.
.gitlab-ci-vue-qmai-runner2.yml
View file @
1af43f97
...
@@ -18,10 +18,9 @@
...
@@ -18,10 +18,9 @@
# variables:
# variables:
# NginxAliasDirectory: bakingCenter
# NginxAliasDirectory: bakingCenter
# 环境变量
# 环境变量
variables
:
variables
:
GIT_SUBMODULE_STRATEGY
:
recursive
# 开启子模块
GIT_SUBMODULE_STRATEGY
:
recursive
# 开启子模块
stages
:
stages
:
-
check_and_cicd
-
check_and_cicd
...
@@ -41,17 +40,17 @@ check_and_cicd:
...
@@ -41,17 +40,17 @@ check_and_cicd:
# 打印Ng目录别名
# 打印Ng目录别名
-
echo -e "NginxAliasDirectory:${NginxAliasDirectory}"
-
echo -e "NginxAliasDirectory:${NginxAliasDirectory}"
# fnm Node版本管理器切换版本
# fnm Node版本管理器切换版本
-
'
[[
-n
$Node_VERSION
]]
&&
fnm
use
$Node_VERSION'
-
"
[[
-n
$Node_VERSION
]]
&&
fnm
use
$Node_VERSION"
# 安装依赖
# 安装依赖
-
pnpm install --ignore-scripts --no-frozen-lockfile --registry https://hub.qimai.shop/repository/npm-group/ --color
-
pnpm install --ignore-scripts --no-frozen-lockfile --registry https://hub.qimai.shop/repository/npm-group/ --color
# 编译
# 编译
-
'
[[
${IsVite}
=
"true"
]]
&&
PathType="base"
||
PathType="assetPath"'
-
'
[[
${IsVite}
=
"true"
]]
&&
PathType="base"
||
PathType="assetPath"'
-
'
[[
${EnableOSS}
=
"true"
]]
&&
options="--
--
--${PathType}
https://rscdn.zmcms.cn/${NginxAliasDirectory}/"
||
options=""'
-
'
[[
${EnableOSS}
=
"true"
]]
&&
options="--
--
--${PathType}
https://rscdn.zmcms.cn/${NginxAliasDirectory}/"
||
options=""'
-
pnpm
run build --color
${options}
-
pnpm
--color run build
${options}
# 部署OSS
# 部署OSS
-
'
[[
${EnableOSS}
=
"true"
]]
&&
ossutil64
cp
-rf
dist/
oss://zmcms-cn-vue/${NginxAliasDirectory}
--exclude
"*.html"
--exclude
".htaccess"
&&
echo
"推送对象存储成功!"'
-
'
[[
${EnableOSS}
=
"true"
]]
&&
ossutil64
cp
-rf
dist/
oss://zmcms-cn-vue/${NginxAliasDirectory}
--exclude
"*.html"
--exclude
".htaccess"
&&
echo
"推送对象存储成功!"'
-
'
[[
$?
!=
0
]]
&&
echo
"部署出错!"
&&
exit
1'
-
'
[[
$?
!=
0
]]
&&
echo
"部署出错!"
&&
exit
1'
# 部署服务器
# 部署服务器
-
'
webpath=/www/web/${CI_PROJECT_PATH_SLUG}/public_html'
-
"
webpath=/www/web/${CI_PROJECT_PATH_SLUG}/public_html"
-
ssh www@192.168.192.69 "mkdir -p ${webpath}"
-
ssh www@192.168.192.69 "mkdir -p ${webpath}"
-
rsync --quiet -azv --delete dist/ www@192.168.192.69:${webpath}
-
rsync --quiet -azv --delete dist/ www@192.168.192.69:${webpath}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment