ci(site): 官网构建/部署直接在 runner 跑,去掉嵌套 docker(修 DinD 挂载)
Deploy Site / deploy-site (push) Successful in 1m23s

job 容器内 $PWD(/workspace/...)在宿主不存在,docker run -v $PWD 挂载失败。
runner 镜像 catthehacker/ubuntu:act-latest 自带 node/npx,直接 bash 跑即可。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-07-06 14:34:12 +08:00
parent ba5f71b716
commit f6e565ffdc
+7 -9
View File
@@ -17,17 +17,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Compile (Astro 官网, node:20 容器内构建)
run: |
docker run --rm -v "$PWD:/w" -w /w \
-e SITE_URL=https://pangolin.yanmeiai.com \
node:20 bash scripts/ci/compile-site.sh
# runner 镜像 catthehacker/ubuntu:act-latest 自带 node/npx,直接跑;
# 不用嵌套 docker run(job 容器内的 $PWD 在宿主上不存在,DinD 挂载会失败)。
- name: Compile (Astro 官网)
env:
SITE_URL: https://pangolin.yanmeiai.com
run: bash scripts/ci/compile-site.sh
- name: Deploy → Cloudflare Pages
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
run: |
docker run --rm -v "$PWD:/w" -w /w \
-e CLOUDFLARE_API_TOKEN -e CLOUDFLARE_ACCOUNT_ID \
node:20 bash scripts/ci/deploy-site.sh
run: bash scripts/ci/deploy-site.sh