Deploying Vite project to GitHub Pages ROOT (index) #176242
-
Why are you starting this discussion?Question What GitHub Actions topic or product is this about?Workflow Configuration Discussion DetailsUsing https://vite.dev/guide/static-deploy.html#github-pages, I've successfully deployed to GitHub Pages with .../repo, but am not sure how to deploy to / (index). I have searched the docs and these discussions. I see references such as I want to deploy my build to https://org.github.io, not https://org.github.io/repo. Any tips for configuration? I assume a parameter to Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hi there 👋 To deploy your Vite project to the root of your GitHub Pages site (e.g., https://org.github.io), you need to configure both the repository and Vite build settings correctly. Changing url: ${{ steps.deployment.outputs.page_url }} will not affect the deployment location — that value is informational only. 🔹 Steps to deploy to the root
✅ TL;DR
This setup ensures your site is served at / instead of /repo. |
Beta Was this translation helpful? Give feedback.
Hi there 👋
To deploy your Vite project to the root of your GitHub Pages site (e.g., https://org.github.io), you need to configure both the repository and Vite build settings correctly. Changing url: ${{ steps.deployment.outputs.page_url }} will not affect the deployment location — that value is informational only.
🔹 Steps to deploy to the root