8000 bug: 🐝 fatal: 'origin/gh-pages' is not a commit and a branch 'gh-pages' cannot be created from it · Issue #1689 · JamesIves/github-pages-deploy-action · GitHub
[go: up one dir, main page]

Skip to content
bug: 🐝 fatal: 'origin/gh-pages' is not a commit and a branch 'gh-pages' cannot be created from it #1689
@Hokkaydo

Description

@Hokkaydo

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

Git configured… 🔧
Starting to commit changes…
/usr/bin/git ls-remote --heads ***github.com/EPLStudents/eplstudents.github.io.git refs/heads/gh-pages
6fbcef37e6b0171a0c0a402dcf8dda0b7eb619e0	refs/heads/gh-pages
Creating worktree…
/usr/bin/git fetch --no-recurse-submodules --depth=1 origin gh-pages
From https://github.com/EPLStudents/eplstudents.github.io
 * branch            refs/gh-pages -> FETCH_HEAD
/usr/bin/git worktree add --no-checkout --detach github-pages-deploy-action-temp-deployment-folder
Preparing worktree (detached HEAD 8c53f48)
/usr/bin/git checkout -B gh-pages origin/gh-pages
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.
/usr/bin/git checkout -B temp-1727024220934 origin/gh-pages
fatal: 'origin/gh-pages' is not a commit and a branch 'temp-1727024220934' cannot be created from it
Running post deployment cleanup jobs… 🗑️
/usr/bin/git checkout -B github-pages-deploy-action/zo89g44m4
Switched to a new branch 'github-pages-deploy-action/zo89g44m4'
/usr/bin/chmod -R +rw github-pages-deploy-action-temp-deployment-folder
/usr/bin/git worktree remove github-pages-deploy-action-temp-deployment-folder --force
Error: The deploy step encountered an error: There was an error creating the worktree: The process '/usr/bin/git' failed with exit code 128 ❌ ❌
Notice: Deployment failed! ❌

Workflow

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:
          token: ${{ secrets.GITHUB_TOKEN }} 
          branch: gh-pages
          folder: static
          clean: true

Additional Comments

No response

Metadata

Metadata

Assignees

Labels

bug 🐝This issue describes a bug.researching 📒Currently researching potential fixes.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0