tschaub / gh-pages

General purpose task for publishing files to a gh-pages branch on GitHub
https://www.npmjs.com/package/gh-pages
MIT License
3.24k stars 190 forks source link

gh-pages process hangs #369

Open willjrowe opened 4 years ago

willjrowe commented 4 years ago

I am trying to use gh-pages to help deploy my Gatsby site.

My deploy script is : gatsby build --prefix-paths && gh-pages -d public

When I initially run npm run deploy, everything builds fine but then the process just hangs with no output.

If I then cancel the process and re-run npm run deploy I get this error: fatal: A branch named 'gh-pages' already exists. However I cannot find evidence of this branch locally or remotely.

I then clear the gh-pages cache and re-run npm run deploy again and again the process hangs and the cycle is repeated.

However someone was helping me through this issue and they were able to get their fork of my repo to work perfectly.

I was just wondering what might be causing this issue. Thank you!

My friend's (working) repo: https://github.com/sa-webb/IR-Plan-Site My Repo: https://github.com/willjrowe/IR-Plan-Site/pull/1 (Please ignore any weird changes, I have tried a variety of approaches that might not be cleaned up nicely)

qnxdev commented 3 years ago

Having same issue, any idea how to see the log?

MatteoInfi commented 3 years ago

Same bug here, it basically does nothing.

rpherbig commented 2 years ago

I was having this same problem. I discovered that a GitHub login dialog had popped up, but hidden behind my other windows. Logging in to that dialog fixed the problem.

jafin commented 2 years ago

@qnxdev to see log run it with env var NODE_DEBUG=gh-pages ie from pacakge.json

"gh-pages": "cross-env NODE_DEBUG=gh-pages gh-pages -d docs"
coltonro commented 2 years ago

I fixed my issue by separating the frontend and backend repos. Leaving this comment for others who may find this thread through google like I did.

When I tried to deploy my fullstack app all at once, the npm deploy command would hang. Once I removed my server folder so ONLY frontend files remained, commited and pushed, then ran the deploy command, it published successfully.

RadientBrain commented 1 year ago

I am trying to use gh-pages to help deploy my Gatsby site.

My deploy script is : gatsby build --prefix-paths && gh-pages -d public

When I initially run npm run deploy, everything builds fine but then the process just hangs with no output.

If I then cancel the process and re-run npm run deploy I get this error: fatal: A branch named 'gh-pages' already exists. However I cannot find evidence of this branch locally or remotely.

I then clear the gh-pages cache and re-run npm run deploy again and again the process hangs and the cycle is repeated.

However someone was helping me through this issue and they were able to get their fork of my repo to work perfectly.

I was just wondering what might be causing this issue. Thank you!

My friend's (working) repo: https://github.com/sa-webb/IR-Plan-Site My Repo: willjrowe/IR-Plan-Site#1 (Please ignore any weird changes, I have tried a variety of approaches that might not be cleaned up nicely)

Here is the solution for it: https://stackoverflow.com/questions/63964575/fatal-a-branch-named-gh-pages-already-exists