Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup step fails to complete #365

Closed
stefanv opened this issue Jul 15, 2020 · 18 comments
Closed

Cleanup step fails to complete #365

stefanv opened this issue Jul 15, 2020 · 18 comments
Labels
feature request ✨ New feature or request version 3 Issues related to version 3 of this action.

Comments

@stefanv
Copy link

stefanv commented Jul 15, 2020

In our workflow we are seeing the following error:

Running post deployment cleanup jobs… 🗑️
/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 1 ❌

It seems like git should be able to remove the worktree, so I'm not sure why it is failing.

@JamesIves
Copy link
Owner

JamesIves commented Jul 15, 2020

Does the action properly make the deployment? If not I'm guessing this isn't the actual error and it's failing higher up in the process.

My gut reaction is it's to do with your use of an ssh key and the REPOSITORY_NAME field. Did you add the deployment key to the repo you're attempting to deploy to or the one the action runs on?

@JamesIves
Copy link
Owner

No .pre-commit-config.yaml file was found
- To temporarily silence this, run `PRE_COMMIT_ALLOW_NO_CONFIG=1 git ...`
- To permanently silence this, install pre-commit with the --allow-missing-config option
- To uninstall pre-commit run `pre-commit uninstall`

There's also this. Looks like it's attempting to run a pre-commit hook that's throwing the error.

@thisismydesign
Copy link

I'm having a similar issue with pre-commit. Is there a way to add parameters to the git commit? Adding --no-verify would solve this for me.

/usr/bin/git commit -m Deploying to gh-pages from  @ 90a97b7dc96d435649acfd5474ebc135e04f742c 🚀 --quiet
/home/runner/work/dotdev/dotdev/.git/hooks/pre-commit: line 2: ./node_modules/pre-commit/hook: No such file or directory
Running post deployment cleanup jobs… 🗑️
/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 1 ❌
Deployment failed! ❌

Overall I can't tell why this happens. It used to work, I tried with those versions but no luck. I'm getting this even with a clean installation after removing the cache. pre-commit version is the latest (and has been for 4 years).

@JamesIves
Copy link
Owner

I see no reason to not add the no-verify flag as the default option, this will make the deployment more predictable. I'm happy to add this either later today or early tomorrow.

@thisismydesign
Copy link

Thanks! If you don't want it to change existing functionality, the ability to extend the command with custom parameters would also be an option.

@JamesIves
Copy link
Owner

I can't think of a situation where a pre-commit hook would/should be used in conjunction with the commands it performs, but maybe I'm missing something?

@thisismydesign
Copy link

Me neither really. :)

@stefanv
Copy link
Author

stefanv commented Jul 27, 2020

That would probably solve our problem too, thanks!

@JamesIves
Copy link
Owner

@JamesIves JamesIves added feature request ✨ New feature or request version 3 Issues related to version 3 of this action. labels Jul 27, 2020
@thisismydesign
Copy link

Thanks a lot for the quick fix!

@stefanv
Copy link
Author

stefanv commented Jul 27, 2020

Thanks very much, indeed!

@SooluThomas
Copy link

I'm still facing this error (even after bumping to the latest version). This is weird because it is working fine on a few jobs and errors randomly. (link)

image

Is there a way to fix this? Thank you.

@stefanv
Copy link
Author

stefanv commented Jul 29, 2020

Could we catch the git error and print it out, to make debugging easier?

@JamesIves
Copy link
Owner

It gets printed right before the generic git error;

@SooluThomas Can you turn disable SILENT and re-run the job? It's also recommended that you lock the version to the latest release as it's possible GitHub Actions is running a cached version: JamesIves/github-pages-deploy-action@3.5.9

@SooluThomas
Copy link

Yes, it worked. Thank you!!

@SooluThomas
Copy link

@JamesIves it's failing again :(

@JamesIves
Copy link
Owner

Can you link me to the workflow failures so I can debug?

@SooluThomas
Copy link

SooluThomas commented Jul 31, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request ✨ New feature or request version 3 Issues related to version 3 of this action.
Projects
None yet
Development

No branches or pull requests

4 participants