JamesIves/github-pages-deploy-action

bug: ๐Ÿ Cannot deploy from the root of the repo (?)

gaborcsardi opened this issue ยท 13 comments

Describe the bug

I have a build failing with

...
/usr/bin/git checkout -B github-pages-deploy-action/ayzsk9y5k
fatal: detected dubious ownership in repository at '/__w/cran-metadata/cran-metadata/github-pages-deploy-action-temp-deployment-folder'
To add an exception for this directory, call:

	git config --global --add safe.directory /__w/cran-metadata/cran-metadata/github-pages-deploy-action-temp-deployment-folder
Error: The process '/usr/bin/git' failed with exit code 128
Notice: Deployment failed! โŒ

See https://github.com/r-hub/cran-metadata/actions/runs/11054520728/job/30711489044#step:5:63
Workflow file: https://github.com/r-hub/cran-metadata/blob/fc798e20c81ab6a347bf2ed19dd1226104e43ec0/.github/workflows/cran-update.yml

After the suggested fix: r-hub/cran-metadata@04bbb0c
the build is green: https://github.com/r-hub/cran-metadata/actions/runs/11054605847/job/30711786063

Do you think this is an issue with the deploy action?

Reproduction Steps

Fork the https://github.com/r-hub/cran-metadata repo (all branches), enable actions, trigger the cran-update action on the deploy-bug branch.

Logs

See above and at https://github.com/r-hub/cran-metadata/actions/runs/11054520728/job/30711489044#step:5:63

Workflow

See above and at https://github.com/r-hub/cran-metadata/blob/fc798e20c81ab6a347bf2ed19dd1226104e43ec0/.github/workflows/cran-update.yml

Additional Comments

Thanks for the great project, we use it A LOT.

Ah yeah this seems like a bug where we need to use the wildcard. I'll see about pushing up a patch version for this when I get a spare moment, thanks for reporting this!

A patch for this has been released as part of v4.6.5, if you continue to see issues please let me know!

Can you provide the log files? I'm unable to access this

Pushed up 4.6.6 which reverts this change, let me re-visit this and get you a beta version later today.

I don't know if this is related but this action just started failing for me without any changes in my repo, e.g.

https://github.com/getwilds/registry/actions/runs/11075200637/job/30776070332#step:6:17

Error: File not found: '/home/runner/work/_actions/JamesIves/github-pages-deploy-action/v4.6.6/lib/main.js'

Same result with @v4 and @v4.6.6
Happy to delete this comment if this is unrelated

It is unrelated, but that issue should be resolved now.

Possible fix for the above, please try pointing your workflow to JamesIves/github-pages-deploy-action@releases/v4-dubious-bug. I wasn't able to repro this myself, but this change adds the temp worktree directory to the safe list as directed by the error message itself.

@JamesIves thanks!

Great! Thanks for testing. I'll push a release up for this in the morning and ping the thread. Enjoy your weekend!