ci: 为workflow添加代理检测 #32
@ -6,6 +6,16 @@ jobs:
|
|||||||
build-and-deploy:
|
build-and-deploy:
|
||||||
runs-on: node22-build
|
runs-on: node22-build
|
||||||
steps:
|
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
|
- name: Checkout
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
- name: Setup pnpm
|
- name: Setup pnpm
|
||||||
|
|||||||
Reference in New Issue
Block a user