framework
framework copied to clipboard
[GitHub Pages Deployment] Renaming a repository can result in a broken deploy
Environment
- Operating System:
Darwin - Node Version:
v16.14.2 - Nuxt Version:
3.0.0 - Nitro Version:
1.0.0 - Package Manager:
[email protected] - Builder:
vite - User Config:
runtimeConfig,modules,css,strapi,ui,colorMode - Runtime Modules:
@vueuse/[email protected],@nuxthq/[email protected],@nuxtjs/[email protected],@nuxt/[email protected],@nuxthq/[email protected],[email protected] - Build Modules:
-
Reproduction
- Fork this repo: https://github.com/larbish/content-wind-studio-local
- It will automatically deploy on
https://{{github-owner}}.github.io/content-wind-studio-local/ - Rename your repository
https://{{github-owner}}.github.io/{{renamed-name}}/is broken because of theNUXT_APP_BASE_URLset in the ci- 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