Skip to content

Commit a08c654

Browse files
author
libin
committed
文档中关于下载地址优化
1 parent 6a3c245 commit a08c654

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

.github/workflows/deploy.example.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- main
7+
- feature/docs_to_urls
78
pull_request:
89
branches:
910
- main
@@ -74,8 +75,16 @@ jobs:
7475
7576
7677
# 部署
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"
7886
echo "deploy_docker_url: $deploy_docker_url"
87+
7988
curl -o deploy.sh $deploy_docker_url
8089
chmod +x deploy.sh
8190
./deploy.sh key deploy

README.cn.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ EOF
4545
### 脚本运行
4646
**方法1: 不下载直接运行部署脚本**
4747
```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>
4949
```
5050
此方法适用于临时执行,不需要将脚本文件保留到本地,直接通过 curl 管道传递给 bash 执行。
5151

5252

5353
**方法2: 下载后运行部署脚本(推荐)**
5454
```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
5656
chmod +x deploy.sh
5757
./deploy.sh <AUTH_METHOD> <ACTION>
5858
```

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ EOF
4646
### Running the Script
4747
**Method 1: Run the deployment script directly without downloading**
4848
```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>
5050
```
5151
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.
5252

5353

5454
**Method 2: Run the deployment script after downloading (recommended)**
5555
```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
5757
chmod +x deploy.sh
5858
./deploy.sh <AUTH_METHOD> <ACTION>
5959
```

0 commit comments

Comments
 (0)