修复 git 命令找不到:添加 Nix 路径到 PATH
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Failing after 0s

问题:Runner 在 host 模式下 PATH 不包含 ~/.nix-profile/bin
解决:在检出代码前添加 Nix 路径到 PATH

这样 git 命令就能被找到(安装在 ~/.nix-profile/bin/git)
This commit is contained in:
2026-01-20 11:12:11 +08:00
parent d78f45b04f
commit a44f6779c2

View File

@@ -20,6 +20,8 @@ jobs:
steps:
- name: 检出代码
run: |
# 添加 Nix 路径到 PATHgit 安装在这里)
export PATH="$HOME/.nix-profile/bin:/usr/local/bin:/usr/bin:/bin:$PATH"
git clone https://git.boss160.cn/csxj2026/junhong_cmp_fiber.git .
git checkout ${{ github.sha }}