vuepress-deploy icon indicating copy to clipboard operation
vuepress-deploy copied to clipboard

fatal: not in a git directory

Open jiayechao opened this issue 2 years ago • 2 comments

配置文件

name: Build and Deploy on: [push] jobs: build-and-deploy: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@master - name: vuepress-deploy uses: jenkey2011/vuepress-deploy@master env: ACCESS_TOKEN: ${{token}} TARGET_REPO: jiayechao/teamsite TARGET_BRANCH: gh-pages BUILD_SCRIPT: npm install && npm run docs:build BUILD_DIR: docs/.vuepress/dist

报错信息

Build success ==> Changing directory to 'docs/.vuepress/dist' ... ==> Prepare to deploy Initialized empty Git repository in /github/workspace/docs/.vuepress/dist/.git/ fatal: not in a git directory

jiayechao avatar Feb 10 '23 02:02 jiayechao

同是这个问题,请问你现在知道怎么解决吗

hhhxiao avatar Feb 10 '23 15:02 hhhxiao

BUILD_SCRIPT: git config --global --add safe.directory "*" && npm install&& npm run docs:build

应该是新的ubuntu的镜像 安装的 git 进行了版本升级,添加了新的目录安全限制。加上这个就可以了。

island086 avatar Feb 10 '23 16:02 island086