-
-
Notifications
You must be signed in to change notification settings - Fork 365
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
bug: 🐝 fatal: 'origin/gh-pages' is not a commit and a branch 'gh-pages' cannot be created from it #1689
Comments
What happens if you remove the token parameter and use the default built in GitHub token? Tried to repro this via the integration tests but was unable, makes me curious if there's some sort of scope problem manifesting here 🤔 |
I tried both. To be fair, I was not using the token parameter at first and then tried with it but nothing changed :( |
Do you have any branch protection rules, or any other sort of repo settings that could be interfereing with branch creation? I forked your project in a test org and I was able to get it to work, both when a name: Deploy to GitHub Pages
on:
push:
branches:
- master
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.7 # This action checks out your repository
- name: Run gen_static.sh script
run: sh gen_static.sh
- name: Build and Deploy
uses: JamesIves/github-pages-deploy-action@v4.6.4
with:
branch: gh-pages
folder: static
clean: true Deployed: https://jives-test-org.github.io/eplstudents.github.io/ |
I was able to reproduce this under very specific circumstances, can you give |
Hey, sorry for being back so late. It's still the same scenario :( This is without an existing gh-pages branch
And this when it exists
It looks like the problem is right there And to answer your questions on branch protection rules, none of them is enabled |
Are you pushing commits one directly after another? I see that both jobs in your workflows happened very shortly after one another. If there's two git operations ongoing at once, it will cause problems. Can you try adding name: Deploy to GitHub Pages
on:
push:
branches:
- master
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
concurrency: ci-${{ github.ref }}
steps:
- uses: actions/checkout@v4.1.7 # This action checks out your repository
- name: Run gen_static.sh script
run: sh gen_static.sh
- name: Build and Deploy
uses: JamesIves/github-pages-deploy-action@v4.6.4
with:
branch: gh-pages
folder: static
clean: true This will make it so only a single deployment job occurs at once |
I just re-run workflows while testing different configurations so this may explain the short timings between runs. I ran with the concurrency setting and still the same result :x |
Really weird. When you're trying with an existing branch, is this after the action has made the first push to the gh-pages branch? When I look at the gh-pages branch in your repo the commit messages do not match one that the action makes. Could imply that there's something to do with how the branch was originally pushed but hard to say. I've tried to reproduce this a number of different ways but haven't seem to find what's causing this yet. |
It's because I renamed the crurent gh-pages branch into something elle
while testing the action. And after tests I renamed back.
The commits come from me to make the website work.
Le mar. 1 oct. 2024, 16:54, James Ives ***@***.***> a écrit :
… Really weird. When you're trying with an existing branch, is this *after*
the action has made the first push to the gh-pages branch? When I look at
the gh-pages branch in your repo the commit messages don't match those of
the action
—
Reply to this email directly, view it on GitHub
<#1689 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKCRZPK56LRFKLIR74L4JF3ZZKZR7AVCNFSM6AAAAABOUW5Q3WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBWGIZDSNBXG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Describe the bug
Receiveing :
fatal: 'origin/gh-pages' is not a commit and a branch 'gh-pages' cannot be created from it Error encountered while checking out branch. Attempting to continue with a new branch name.
If no gh-pages branch already exists, everything goes well except the branch isn't created so nothing is deployed
Reproduction Steps
Run the given yaml script with an already existing deploy branch. Was working when using v4 at a time but not anymore so I updated and still not working. The repository is this one
Logs
Workflow
Additional Comments
No response
The text was updated successfully, but these errors were encountered: