4

I am trying to deploy my app to git pages and I have status failure for GitHub pages.

When I am start "pages build and deployment" in Action, I have a next problems:

1) Build > Checkout > Fetching submodules:
  /usr/bin/git submodule sync --recursive
  /usr/bin/git -c protocol.version=2 submodule update --init --force --depth=1 --recursive
  Error: fatal: No url found for submodule path 'dist' in .gitmodules
  Error: The process '/usr/bin/git' failed with exit code 128
2)Deploy > Deploy to github pages:
Error: Error: No uploaded artifact was found! 
Please check if there are any errors at build step.

Did I do something wrong?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Hikki_Yarik
  • 63
  • 1
  • 5

1 Answers1

2

Check the content of your .gitmodules file:

If it includes only one entry [submodule "dist"], with a module path dist, without URL,
then delete the .gitmodules file entirely, add, and commit.
(Note: as in here, check if you have a dist (no trailing slash) entry, and remove it if you do: git rm --cached -- dist).

Then try again the deployment process.

A valid .gitmodules entry should have both URL and path:

[submodule "dist"]
    path = dist
    url = git://github.com/user/repo.git
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I tried following these steps and am still getting the same error. The error: `Error: fatal: No url found for submodule path 'themes/avicenna' in .gitmodules`. However, my `.gitmodules` file (in the root directory of the repo containing the submodule) contains a `[submodule "themes/avicenna/"]` entry with the correct url. I'd really appreciate any suggestions on where I'm going wrong! – sdg Jul 11 '22 at 06:29
  • 1
    @sdg Maybe a `git submodule update --init` would help Git to re-read your `.gitmodules` and initialize it accordingly? – VonC Jul 11 '22 at 06:32
  • Thanks @VonC. This helped me figure out that the submodule entry was missing a `path` entry, as in [here](https://stackoverflow.com/questions/4185365/no-submodule-mapping-found-in-gitmodule-for-a-path-thats-not-a-submodule). – sdg Jul 11 '22 at 06:37
  • 1
    @sdg Thank you for this feedback. I have edited the answer to make that clearer. – VonC Jul 11 '22 at 06:44