JamesIves/github-pages-deploy-action

Commit fails with "process '/usr/bin/git' failed with exit code 128"

cmatKhan opened this issue · 3 comments

Describe the bug

The pkgdown gh-pages deploy script fails b/c it can't find git

Run JamesIves/github-pages-deploy-action@v4.4.1
  
....

/usr/bin/git worktree remove github-pages-deploy-action-temp-deployment-folder --force
Error: The deploy step encountered an error: The process '/usr/bin/git' failed with exit code 128 ❌
Notice: Deployment failed! ❌

This seems to be the same issue as the one closed in #308.

Reproduction Steps

the script is here:

https://github.com/cmatKhan/brentlabXGBoost/blob/main/.github/workflows/pkgdown.yaml

note that this is modified to use renv to handle the dependencies.

Nevermind -- my bad. The default is to restrict read/write by actions.

To fix:

Settings --> Actions --> general --> Workflow permissions

and set to read and write

image

Nevermind -- my bad. The default is to restrict read/write by actions.↳

To fix:

Settings --> Actions --> general --> Workflow permissions↳

and set to read and write↳

not work
image

name: CI
on:
schedule:
- cron: '0 */6 * * *' # 每 6 小时触发
push:
branches: [main] #要生成的logseq库分支名称

Allows you to run this workflow manually from the Actions tab

workflow_dispatch:

env:
TZ: 'Asia/Shanghai'

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
name: Publish Logseq graph
steps:
- uses: actions/checkout@v3
- name: Logseq Publish 🚩
uses: logseq/publish-spa@v0.2.0 #生成html文件,并push到gh-pages分支
with:
theme-mode: dark
- name: add a nojekyll file #标记为非jekyll
run: touch $GITHUB_WORKSPACE/www/.nojekyll
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
repository-name: funv5/logseq_publish # 公开的仓库地址
branch: main # The branch the action should deploy to.
folder: www # The folder the action should deploy. 临时目录名称
clean: true #始终覆盖更新
single-commit: true
trace: false
token: ${{ secrets.ACCESS_TOKEN }}

image

Nevermind -- my bad. The default is to restrict read/write by actions.↳
To fix:
Settings --> Actions --> general --> Workflow permissions↳
and set to read and write↳

not work image

name: CI on: schedule: - cron: '0 */6 * * *' # 每 6 小时触发 push: branches: [main] #要生成的logseq库分支名称

Allows you to run this workflow manually from the Actions tab

workflow_dispatch:

env: TZ: 'Asia/Shanghai'

permissions: contents: write

jobs: build: runs-on: ubuntu-latest name: Publish Logseq graph steps: - uses: actions/checkout@v3 - name: Logseq Publish 🚩 uses: logseq/publish-spa@v0.2.0 #生成html文件,并push到gh-pages分支 with: theme-mode: dark - name: add a nojekyll file #标记为非jekyll run: touch $GITHUB_WORKSPACE/www/.nojekyll - name: Deploy 🚀 uses: JamesIves/github-pages-deploy-action@v4 with: repository-name: funv5/logseq_publish # 公开的仓库地址 branch: main # The branch the action should deploy to. folder: www # The folder the action should deploy. 临时目录名称 clean: true #始终覆盖更新 single-commit: true trace: false token: ${{ secrets.ACCESS_TOKEN }}

确实这样做的,但是没有生效。