ci: 云端发布改为 tag 触发(push v* 即审核发布),clone 动态 ref
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
name: 部署-局域网
|
||||
# push 到 main 即自动上线 51.66(无人工环节)
|
||||
# 合并/推送到 main 即自动上线 51.66(集成分支 = 内部预发布环境)
|
||||
# feature 分支的 push 不触发,开发期不影响线上
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
@@ -10,7 +11,7 @@ jobs:
|
||||
steps:
|
||||
- name: 拉取代码
|
||||
run: |
|
||||
git clone --depth 1 "http://dafe:${{ secrets.GITHUB_TOKEN }}@192.168.51.66:3000/dafe/homepage.git" site
|
||||
git clone --depth 1 --branch "${GITHUB_REF_NAME}" "http://dafe:${{ secrets.GITHUB_TOKEN }}@192.168.51.66:3000/dafe/homepage.git" site
|
||||
|
||||
- name: 注入构建版本号(缓存击穿,版本=commit 短 SHA)
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user