Closed
Description
Describe the bug
Fails to push when using single-commit: true
Reproduction Steps
Check this section, which is the exact setup used for the failed CI run (linked below).
I believe this only occurs because I use the main
branch name, but I have not tested it when using master
.
Logs
https://github.com/time-rs/time/runs/2314741348?check_suite_focus=true#step:7:43
Additional Comments
This works fine when single-commit: true
is not present.
Metadata
Metadata
Assignees
Labels
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
JamesIves commentedon Apr 11, 2021
This looks like it's occurring because you're trying to squash the commits on the same branch you're deploying from which is not what single-commit was really designed to do. It's intended to be used when squashing commits on a separate deployment branch to keep the history clean while preserving the timeline on the base branch.
Are you sure you actually want to do this? It's going to mean your main branch has a single commit if this process were to succeed.
jhpratt commentedon Apr 11, 2021
I'm deploying it to a separate repository (time-rs/time-rs.github.io from time-rs/time). If I were deploying it to the same repo (and same branch), I'd absolutely agree — it should fail because it's almost certainly incorrect.
I think you may have missed that they're different repos when looking it over. It worked prior to that commit, though I was using v3 then. I would like to have a single commit on the target repo/branch, which I believe is what the
single-commit
option is intended for, no?JamesIves commentedon Apr 11, 2021
Ah, I did miss that, my bad. I think this is failing for the same reason I mentioned in my last post because of how v4 checks out the remote. It's technically trying to squash commits on the base branch that you're deploying to, just in a different repo.
I'll need to do some investigation on the right way to handle this type of configuration. For now I'd suggest omitting the single-commit option or rolling back to version 3 if it's absolutely necessary.
jhpratt commentedon Apr 11, 2021
Sounds good! I've already omitted the option which works as expected. Thanks for the quick responses.
johan13 commentedon May 19, 2021
This is on the 4.1.2 milestone. I am running 4.1.3, but the problem appears to still be there. Is it just the milestone that needs to be updated, or am I doing something wrong and this is now supposed to work?
Edit: I couldn't get 3.x to work, so I worked around this issue by using
gh-pages
as the branch name on the repository I am pushing to. That works fine. 👍JamesIves commentedon May 20, 2021
Milestone needs to be updated.
3 remaining items