We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 40f86af commit a8145d6Copy full SHA for a8145d6
1 file changed
.github/workflows/pages.yml
@@ -41,6 +41,23 @@ jobs:
41
- name: Checkout
42
uses: actions/checkout@v4
43
44
+ # actions/upload-pages-artifact@v3 显式调用 `gtar`(GNU tar),macOS 默认只有 BSD `tar`,
45
+ # 这里把 Homebrew 路径写进 GITHUB_PATH 并校验 `gtar` 存在。
46
+ # 首次部署前请在这台 self-hosted runner 上执行: brew install gnu-tar
47
+ - name: Ensure GNU tar on PATH (macOS self-hosted)
48
+ if: runner.os == 'macOS'
49
+ shell: bash
50
+ run: |
51
+ for p in /opt/homebrew/bin /usr/local/bin; do
52
+ [ -x "$p/gtar" ] && echo "$p" >> "$GITHUB_PATH"
53
+ done
54
+ export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH"
55
+ if ! command -v gtar >/dev/null; then
56
+ echo "::error::gtar not found. Run once on the runner host: brew install gnu-tar"
57
+ exit 1
58
+ fi
59
+ gtar --version | head -n 1
60
+
61
- name: Setup Node
62
uses: actions/setup-node@v4
63
with:
0 commit comments