ci: 为workflow添加代理检测
All checks were successful
deploy to server / build-and-deploy (push) Successful in 6m32s
All checks were successful
deploy to server / build-and-deploy (push) Successful in 6m32s
- 在workflow的开头添加了Check proxy的job,用于检测网络代理是否启用
This commit is contained in:
@ -6,6 +6,16 @@ jobs:
|
||||
build-and-deploy:
|
||||
runs-on: node22-build
|
||||
steps:
|
||||
- name: Check Proxy
|
||||
run: |
|
||||
echo "HTTP_PROXY = $HTTP_PROXY"
|
||||
echo "HTTPS_PROXY = $HTTPS_PROXY"
|
||||
# 测试网络是否能透过代理访问一个外部 URL,比如 google.com
|
||||
# 也可以换成你常用的 npm registry / GitHub
|
||||
curl -I https://www.google.com --max-time 10 || echo "curl to google failed"
|
||||
# 测试拉取 npm 包或 ping github.com
|
||||
curl -I https://registry.npmjs.org --max-time 10 || echo "curl to registry.npmjs.org failed"
|
||||
ping -c 3 github.com || echo "ping github.com failed"
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
- name: Setup pnpm
|
||||
|
||||
Reference in New Issue
Block a user