framework icon indicating copy to clipboard operation
framework copied to clipboard

[GitHub Pages Deployment] Renaming a repository can result in a broken deploy

Open larbish opened this issue 3 years ago • 0 comments

Environment



Reproduction

  1. Fork this repo: https://github.com/larbish/content-wind-studio-local
  2. It will automatically deploy on https://{{github-owner}}.github.io/content-wind-studio-local/
  3. Rename your repository
  4. https://{{github-owner}}.github.io/{{renamed-name}}/ is broken because of the NUXT_APP_BASE_URL set in the ci
  5. Need to trigger the build workflow manually to fix it.

Describe the bug

When deploying a Nuxt project on github pages on the default github url (https://{{github-owner}}.github.io/{{repo-name}}/, we need to set NUXT_APP_BASE_URL as env var to fix routing navigation.

Because of it when we are renaming the project, navigation is broken after github has been deployed. We need to trigger the build workflow manually to fix it. I don't know if it's fixable it but I think we should at least display a warning in the generate log or a note in the documentation concerning github pages deployment.

I can help to update documentation if needed.

Additional context

No response

Logs

yarn generate
  shell: /usr/bin/bash -e {0}
  env:
    NUXT_PUBLIC_STUDIO_API_URL: http://localhost:1337
    NUXT_APP_BASE_URL: /content-wind-studio-local

larbish avatar Nov 23 '22 14:11 larbish