jenkey2011 / vuepress-deploy

A GitHub Action to build and deploy Vuepress sites to GitHub Pages
MIT License
145 stars 52 forks source link

fatal: not in a git directory #32

Open jiayechao opened 1 year ago

jiayechao commented 1 year ago

配置文件

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

hhhxiao commented 1 year ago

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

island086 commented 1 year ago

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

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