vuepress-deploy
vuepress-deploy copied to clipboard
fatal: not in a git directory
配置文件
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
同是这个问题,请问你现在知道怎么解决吗
BUILD_SCRIPT: git config --global --add safe.directory "*" && npm install&& npm run docs:build
应该是新的ubuntu的镜像 安装的 git 进行了版本升级,添加了新的目录安全限制。加上这个就可以了。