
helo-deploy.yml 文件 
github 仓库 actions 里 Build and Deploy 没有什么报错,最后有两行这个输出
>>> Config git ... Initialized empty Git repository in /github/workspace/public/.git/ fatal: not in a git directory // hexo d/g 都是成功的 github token 更新换了几个了,都是这个信息输出,请问彦祖们这个是什么引起的,因为最近没动过配置信息
1 sonders OP 有哪位彦祖遇到过类似的部署问题吗? |
2 liyang5945 2022 年 12 月 16 日 这是你用的这个脚本的问题,theme-keep……这个,我用的是这个,部署 out 目录到 master 分支 - name: Deploy uses: JamesIves/[email protected] with: branch: master folder: out single-commit: true |
3 sonders OP 和成功的对比了下,发现 成功的信息输出是 ```js 找到了访问仓库的 gh-pages 分支,而失败的同行信息是 fatal: not in a git directory ``` |
4 sonders OP @liyang5945 一直用的都是这个,三天前还成功提交了一次,theme-keep/hexo-deploy-github-pages-action@master 你的意思是说这个脚本本身出了问题? |
5 shmilyab 2022 年 12 月 16 日 哇老哥我现在就在搞这个,和你一样的问题。这是怎么回事,我在作者官方群里提出问题了但是没人解答。 |
6 shmilyab &bsp;2022 年 12 月 16 日 老哥你解决了吗 |
7 AsyncX 2022 年 12 月 17 日 不如换个脚本? # workflow name name: Hexo Blog CI # master branch on push, auto run on: push: branches: - master jobs: build: runs-on: ubuntu-latest steps: # check it to your workflow can access it # from: https://github.com/actions/checkout - name: Checkout Repository master branch uses: actions/checkout@master # from: https://github.com/actions/setup-node - name: Setup Node.js 12.x uses: actions/setup-node@master with: node-version: "12.x" - name: Setup Hexo Dependencies run: | npm install hexo-cli -g npm install - name: Setup Deploy Private Key env: HEXO_DEPLOY_PRIVATE_KEY: ${{ secrets.HEXO_DEPLOY_PRIVATE_KEY }} run: | mkdir -p ~/.ssh/ echo "$HEXO_DEPLOY_PRIVATE_KEY" > ~/.ssh/id_rsa chmod 600 ~/.ssh/id_rsa ssh-keyscan github.com >> ~/.ssh/known_hosts - name: Setup Git Infomation run: | git config --global user.name 'xxxx' git config --global user.email 'xxxx' - name: Deploy Hexo run: | hexo clean hexo generate hexo deploy |
13 sonders OP |