File tree Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change 4
4
push :
5
5
branches :
6
6
- main
7
+ - feature/docs_to_urls
7
8
pull_request :
8
9
branches :
9
10
- main
74
75
75
76
76
77
# 部署
77
- deploy_docker_url="https://raw.githubusercontent.com/jefferyjob/deployments/refs/heads/feature/before_after_func/scripts/deploy.docker.sh"
78
+ if [[ "${{ github.event_name }}" == "pull_request" ]]; then
79
+ BRANCH="${{ github.head_ref }}"
80
+ else
81
+ BRANCH="${{ github.ref_name }}"
82
+ fi
83
+ echo "branch name: $BRANCH"
84
+
85
+ deploy_docker_url="https://raw.githubusercontent.com/jefferyjob/deployments/refs/heads/$BRANCH/scripts/deploy.docker.sh"
78
86
echo "deploy_docker_url: $deploy_docker_url"
87
+
79
88
curl -o deploy.sh $deploy_docker_url
80
89
chmod +x deploy.sh
81
90
./deploy.sh key deploy
Original file line number Diff line number Diff line change 45
45
### 脚本运行
46
46
** 方法1: 不下载直接运行部署脚本**
47
47
``` bash
48
- curl -fsSL https://raw.githubusercontent. com/jefferyjob/deployments/refs/heads/main /scripts/deploy.docker.sh | bash -s -- < AUTH_METHOD> < ACTION>
48
+ curl -fsSL https://gitee. com/jefferyjob/deployments/raw/v1.0.0 /scripts/deploy.docker.sh | bash -s -- < AUTH_METHOD> < ACTION>
49
49
```
50
50
此方法适用于临时执行,不需要将脚本文件保留到本地,直接通过 curl 管道传递给 bash 执行。
51
51
52
52
53
53
** 方法2: 下载后运行部署脚本(推荐)**
54
54
``` bash
55
- curl -o deploy.sh https://raw.githubusercontent. com/jefferyjob/deployments/refs/heads/main /scripts/deploy.docker.sh
55
+ curl -o deploy.sh https://gitee. com/jefferyjob/deployments/raw/v1.0.0 /scripts/deploy.docker.sh
56
56
chmod +x deploy.sh
57
57
./deploy.sh < AUTH_METHOD> < ACTION>
58
58
```
Original file line number Diff line number Diff line change 46
46
### Running the Script
47
47
** Method 1: Run the deployment script directly without downloading**
48
48
``` bash
49
- curl -fsSL https://raw.githubusercontent.com/jefferyjob/deployments/refs/heads/main /scripts/deploy.docker.sh | bash -s -- < AUTH_METHOD> < ACTION>
49
+ curl -fsSL https://raw.githubusercontent.com/jefferyjob/deployments/refs/tags/v1.0.0 /scripts/deploy.docker.sh | bash -s -- < AUTH_METHOD> < ACTION>
50
50
```
51
51
This method is suitable for temporary execution. It does not need to save the script file locally and directly passes it to bash for execution through the curl pipeline.
52
52
53
53
54
54
** Method 2: Run the deployment script after downloading (recommended)**
55
55
``` bash
56
- curl -o deploy.sh https://raw.githubusercontent.com/jefferyjob/deployments/refs/heads/main /scripts/deploy.docker.sh
56
+ curl -o deploy.sh https://raw.githubusercontent.com/jefferyjob/deployments/refs/tags/v1.0.0 /scripts/deploy.docker.sh
57
57
chmod +x deploy.sh
58
58
./deploy.sh < AUTH_METHOD> < ACTION>
59
59
```
You can’t perform that action at this time.
0 commit comments