Closed vadi2 closed 2 years ago
Deletion of gh-pages
also nuked the entire configuration of github pages, which is unfortunate and somewhat unexpected.
For some reason in this run, GPO deleted my gh-pages branch, which ended up deleting the website and any associated github pages configuration
Hi @vadi2 , sorry for my not noticing your message until months later. (But you switched to a different github action immediately, so I guess I wouldn't be able to help even if I noticed it within days.)
Anyway. Trying to answer your question now, without original logs, my guess is your previous action in your workflow somehow failed and generated nothing into your publish folder /dist
. In such an unexpected corner case, GPO possibly created an empty gh-pages
branch, which in term caused git to delete that branch.
I would assume that, if you fix your previous action, the GPO would then automatically recover.
Deletion of gh-pages also nuked the entire configuration of github pages, which is unfortunate and somewhat unexpected.
This part is probably a github behavior. But the good news is, it seems like nowadays github would also automatically create github pages settings, once a gh-pages
branch is created again.
Closing for now. Feel free to contact me if you would use GPO and run into issues again.
@rayluo Just encountered the same issue and the folder is definitely not empty 🤔
Perhaps my .gitignore
ignoring the build site's build directory is causing the issue?
Could https://github.com/rayluo/github-pages-overwriter/blob/dev/action.yml#L40 become
git add --force ${{ inputs.source-directory }}
?
Hi @rayluo
Run if [ "build" == "." ]; then
1/2 (0) [0]
2/2 (1) [0]
fatal: no new revisions were found
To https://github.com/im7mortal/unrpa
- [deleted] gh-pages
I believe I have the same problem
It mess up with gh pages settings
I checked source code and I don't have idea for now what could be the reason.
I do not currently know the exact reason, so, please bear with me on the following hypothesis. Based on the limited reports (only two so far), there seems to be a common factor between @im7mortal 's report and the original report by @vadi2 , that your repositories do not already contain the target directory ("build" in @im7mortal 's case and "dist" in @vadi2 's case). As a comparison, in my own REPOs that use GPO, such as this one, the target directory already exists in the code base.
So, perhaps @im7mortal you can try adding a /build/placeholder.txt
file into your code base and see whether it makes a difference. Please let me know the result. UPDATE: That idea might be irrelevant. I re-read this project's README and it has this explicit wording "Such a directory does not have to already exist in your repo". :man_shrugging:
@rayluo for now I copied workflow directly to the my pipeline and it started to work.
I will try to narrow down the issue
For some reason in this run, GPO deleted my
gh-pages
branch, which ended up deleting the website and any associated github pages configuration:Any ideas why did it happen?