Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Tip: Don't use fetch-depth: 0! #1858

mathomp4 started this conversation in General
Tip: Don't use `fetch-depth: 0`! #1858
May 29, 2025 * 0 comments
Return to top
Discussion options

mathomp4
May 29, 2025

This is a tip that might be useful for the main README.md. I'm adding it here just in case I ever hit this again in my idiocy and can find the answer again.

I have a repo that uses github-pages-deploy-action and has been doing it just fine for a couple years or more. But I just noticed that the action stopped working. It was failing with:

/usr/bin/git fetch --no-recurse-submodules --depth=1 origin gh-pages
fatal: missing blob object 'dd0f3edd5ca5b6032b5e7c5a89aec41c9803606c'
error: remote did not send all necessary objects
Running post deployment cleanup jobs...
/usr/bin/git checkout -B github-pages-deploy-action/jwruoteje
Error: The cwd: /home/runner/work/MAPL/MAPL/github-pages-deploy-action-temp- deployment-folder does not exist!

After trolling through the commits, I realized things started failing when I went from:

- name: Checkout
uses: actions/checkout@v4

to:

- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
filter: blob:none

in my docs workflow file.

Now, I added the:

with:
fetch-depth: 0
filter: blob:none

in all of my actions to speed things up (though really, the blobless clone was the main thing). Turns out, fetch-depth: 0 is not a good thing with this action. It caused the:

/usr/bin/git fetch --no-recurse-submodules --depth=1 origin gh-pages

to fail (which is obvious in hindsight).

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
General
Labels
None yet
1 participant