🌐
GitHub
github.com › sitek94 › vite-deploy-demo
GitHub - sitek94/vite-deploy-demo: Deploy Vite app to GitHub Pages using GitHub Actions · GitHub
import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], + base: '/vite-deploy-demo/' }) Now, asset links will have a correct path, so commit ...
Starred by 383 users
Forked by 54 users
Languages   JavaScript 52.8% | CSS 34.4% | HTML 12.8%
🌐
GitHub
github.com › ErickKS › vite-deploy
GitHub - ErickKS/vite-deploy: Guide for vite react app deploy · GitHub
name: Deploy on: push: branches: - main jobs: build: name: Build runs-on: ubuntu-latest steps: - name: Checkout repo uses: actions/checkout@v3 - name: Setup Node uses: actions/setup-node@v3 - name: Install dependencies uses: bahmutov/npm-install@v1 - name: Build project run: npm run build - name: Upload production-ready build files uses: actions/upload-artifact@v3 with: name: production-files path: ./dist deploy: name: Deploy needs: build runs-on: ubuntu-latest if: github.ref == 'refs/heads/main' steps: - name: Download artifact uses: actions/download-artifact@v3 with: name: production-files path: ./dist - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./dist
Starred by 356 users
Forked by 67 users
Languages   CSS 51.2% | TypeScript 38.3% | HTML 10.5%
Discussions

Deploying First Vite Project on GitHub Pages
However, when I build and deploy my project for "gh-pages", a new branch is created which only contains a "dist" folder. Yes this is the intention. When deploying to Github Pages, the `gh-pages` branch is a "special" branch that just contains your build output so that Github Pages can read and serve it. More on reddit.com
🌐 r/reactjs
5
0
June 12, 2024
How do I host my react app that was created using Vite on Github pages? I can only find methods to hose on GitHub pages if it’s created with create react app. Any help? Or would y’all recommend using Vercel or something? What are the differences?
Maybe this helps: https://vitejs.dev/guide/static-deploy.html#github-pages More on reddit.com
🌐 r/react
5
6
February 20, 2023
reactjs - How to deploying Vite react app on Github - Stack Overflow
I encountered following error while trying to deploy my React + Vite app on Github. Error: ENOENT: no such file or directory, stat 'C:\Users\mypc\Documents\javascript\newsApp\build' Please help me ... More on stackoverflow.com
🌐 stackoverflow.com
Problems with hosting react/vite project on github pages with a custom domain
Have you tried one of these guides? https://vitejs.dev/guide/static-deploy.html https://github.com/sitek94/vite-deploy-demo More on reddit.com
🌐 r/reactjs
18
0
July 8, 2023
🌐
Vite
vite.dev › guide › static-deploy
Deploying a Static Site | Vite
Push your code to a git repository (GitHub, GitLab, BitBucket, Azure DevOps). Import the project to Netlify.
🌐
DevGenius
blog.devgenius.io › how-to-deploy-your-vite-react-app-to-github-pages-with-and-without-react-router-b060d912b10e
How to Deploy Your Vite React App to GitHub Pages (With and Without React Router) | by Fitrahtur Rahman | Dev Genius
November 8, 2023 - Stage all changes in the current directory using git add ., commit, and push it to our GitHub repository. Under the “Actions” tab, we will see our workflow appear based on our recent push.
🌐
DEV Community
dev.to › rashidshamloo › deploying-vite-react-app-to-github-pages-35hf
Deploying Vite / React App to GitHub Pages - DEV Community
April 15, 2023 - If you're using React Router, you can use the Hash Router instead of the Browser Router. There is also another workaround that I personally use in my projects: spa-github-pages ... Hi! When using Hash Router, do we need to modify base path in vite.config.js to 'repo-name/#' ?
🌐
DEV Community
dev.to › badr21 › create-a-react-app-with-vite-and-deploy-it-on-github-224n
Create a React app with Vite and deploy it on GitHub - DEV Community
March 26, 2023 - This will stage all the files in your project for committing. ... This will create a new commit in the Git repository with the message “Initial commit”. 4- Rename the master branch to main by running the command: ... This will add the GitHub repository as a remote for your local Git repository. 6- Finally, push the changes to the remote repository by running the command: ... This will push the initial commit of your local Git repository to the GitHub repository. With the React app pushed to Github, you can now deploy your React app.
🌐
Medium
medium.com › @badreddine.boudaoud21 › create-a-react-app-with-vite-and-deploy-it-on-github-48b82e19f821
Create a React app with Vite and deploy it on GitHub | by Badreddine Boudaoud | Medium
February 11, 2024 - This will stage all the files in your project for committing. ... This will create a new commit in the Git repository with the message “Initial commit”. 4. Rename the master branch to main by running the command: ... This will add the GitHub repository as a remote for your local Git repository. 6. Finally, push the changes to the remote repository by running the command: ... This will push the initial commit of your local Git repository to the GitHub repository. With the React app pushed to Github, you can now deploy your React app.
🌐
LinkedIn
linkedin.com › pulse › deploying-react-vite-application-mangesh-ahire-p6auf
Deploying a React + Vite application
February 17, 2024 - git init git add . git commit -m "Initial commit" git remote add origin your-repository-url git push -u origin main · Replace 'your-repository-url' with the URL of your GitHub repository.
🌐
Reddit
reddit.com › r/reactjs › deploying first vite project on github pages
r/reactjs on Reddit: Deploying First Vite Project on GitHub Pages
June 12, 2024 -

Hello, I'm creating a simple Note Recorder app with Vite. As many people suggest, I'm trying to track my project with Git and Github. My repository is working fine and I learned how to push recent changes.

However, when I build and deploy my project for "gh-pages", a new branch is created which only contains a "dist" folder.

Is it a good practice to have a "main" branch for inspecting my code as it is originally structured and a "gh-pages" (or whatever name) branch for deploying it?

The purpose of all this is having a portfolio on my resume so recruiters can take a look. This project is simple and uses Local Storage. I want to add more projects in the future using other tools such as Nextjs and a Mongo or Postgres database.

Find elsewhere
🌐
Medium
medium.com › @devxprite › how-to-deploy-vite-react-app-to-github-pages-00e150f73961
How to deploy Vite React App to GitHub Pages | by Prateek Singh | Medium
April 29, 2024 - After running this command, git pushes the contents of the dist directory (which contains the built assets) to the gh-pages branch of your repository. This branch serves as the source for your GitHub Pages website. GitHub automatically detects changes to this branch and updates your website accordingly. Once the deployment process is complete, your website is live! You can access it using the URL : ... Congratulations! Your Vite React website is now successfully deployed to GitHub Pages, and it’s ready to be accessed by users around the world.
🌐
YouTube
youtube.com › watch
Deploy Vite React App to GitHub Pages (2025) - YouTube
Looking to deploy your Vite React app to GitHub Pages? This video provides a clear, step-by-step guide to get you started! Learn how to configure your projec...
Published   April 27, 2024
🌐
YouTube
youtube.com › pedrotech
How To Deploy A React Vite App To Github Pages (Simple) - YouTube
In this video I will teach you guys how to deploy a vite react app to github pages in order to see your projects live.Shoutout to the template I used: https:...
Published   November 21, 2024
Views   6K
🌐
Medium
medium.com › @aishwaryaparab1 › deploying-vite-deploying-vite-app-to-github-pages-166fff40ffd3
Deploying Vite Deploying Vite App to GitHub Pages | by Aishwarya Parab | Medium
July 12, 2023 - $ git commit -m "initial-commit" $ git branch -M main $ git remote add origin http://github.com/{username}/{repo-name}.git $ git push -u origin main · Add the base URL in this file by setting the base as “/{repo-name}/”. For example, if ...
🌐
GitHub
github.com › ErickKS › vite-react-router
GitHub - ErickKS/vite-react-router: Guide for vite react app with router deploy · GitHub
git init git add . git commit -m "add: initial files" git branch -M main git remote add origin https://github.com/[USER]/[REPO_NAME] git push -u origin main · Config -> Actions -> General -> Workflow permissions -> Read and Write permissions ...
Starred by 138 users
Forked by 18 users
Languages   TypeScript 33.4% | CSS 32.5% | HTML 27.1% | JavaScript 7.0%
🌐
DEV Community
dev.to › pedrotech › how-to-deploy-a-vite-react-app-to-github-pages-4j3k
How to Deploy a Vite + React App to GitHub Pages - DEV Community
December 13, 2024 - Replace <your-username> and <repo-name> with your actual GitHub username and repository name. Configure Vite Base URL In vite.config.js, set the base to match your repo’s path: import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' export default defineConfig({ base: '/<repo-name>/', // Add this line plugins: [react()] }) ... This command builds your app and pushes the dist folder to the gh-pages branch of your repo.
🌐
YouTube
youtube.com › watch
How to Deploy React Vite App to GitHub Pages | Step by Step ...
Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube.
🌐
Selftaughttxg
selftaughttxg.com › 2023 › 03-23 › create-a-react-project-push-it-to-github-and-deploy-with-netlify-from-the-command-line
Create a React Project, Push It to GitHub, and Deploy With Netlify, From the Command Line |
March 20, 2023 - First, we need to initiate your project as a GitHub repository. ... Leave the default as origin. ... Now it's time to commit our changes and push our repo up to GitHub. We can add all of our changes with one command as follows: ... warning: in the working copy of 'vite-project/.gitignore', ...
🌐
Stack Overflow
stackoverflow.com › questions › 77933390 › how-to-deploying-vite-react-app-on-github
reactjs - How to deploying Vite react app on Github - Stack Overflow
I encountered following error while trying to deploy my React + Vite app on Github. Error: ENOENT: no such file or directory, stat 'C:\Users\mypc\Documents\javascript\newsApp\build' Please help me ...
🌐
Medium
medium.com › @shivisinghcop › how-to-deploy-a-vite-react-app-to-github-pages-507a9e57bb09
How to deploy a Vite+React app to GitHub Pages | by Shivi | Medium
June 19, 2024 - git init git add . git commit -m "Initial commit" git remote add origin https://github.com/<username>/<repository-name>.git git push -u origin main ... Once you are in your Github repository go to setting on the extreme right.