Compare commits

...

2 Commits

Author SHA1 Message Date
skeleton 85d1456623 更新.gitlab-ci.yml文件 2024-10-14 11:48:42 +00:00
skeleton 0207cb2f53 更新.gitlab-ci.yml文件 2024-10-14 11:44:43 +00:00
1 changed files with 9 additions and 4 deletions

View File

@ -35,6 +35,12 @@ build-job:
deploy-job:
stage: deploy
script:
# 拉取
- echo "拉取deploy"
- cd $GOPATH/src/$DeployPath
- git checkout $CI_COMMIT_REF_NAME
- git pull
# 拷贝data目录
- echo '拷贝data目录'
- cd $GOPATH/src/$ProjectPath
@ -65,10 +71,9 @@ push_job:
script:
# 提交代码
- echo '提交代码'
- cd $GOPATH/src/$DeployPath
- git config user.email "ci@example.com" # 设置提交者的 email
- git config user.name "GitLab CI" # 设置提交者的名称
- cd $GOPATH/src/$DeployPath
- git checkout $CI_COMMIT_REF_NAME
- git add .
- git commit -m "auto commit pipelineId\:$CI_PIPELINE_ID"
- git push origin develop
- git commit -m "auto commit pipelineId $CI_PIPELINE_ID"
- git push origin $CI_COMMIT_REF_NAME