Learning resource for Js and MERN fundamentals, deployed automatically to GitHub Pages using GitHub Actions.
- Built with React and Tailwind CSS for modern web development learning
- Hosted on GitHub Pages: https://abshetty.in/learnMERN/
- Fully automated deployment on every push to the
mainbranch via GitHub Actions (workflow file is already included in this repo at.github/workflows/deploy.yml)
git clone https://github.com/ab007shetty/learnMERN.git && cd learnMERNnpm installnpm run devThe application will be available at http://localhost:5173
If you want to recreate this project from scratch, follow these steps:
# Create a new Vite project with React template
npm create vite@latest learnMERN -- --template react
cd learnMERN
npm install# Install Tailwind CSS and its dependencies
npm install -D tailwindcss postcss autoprefixer
# Generate Tailwind config files
npx tailwindcss init -p- Make sure the
"homepage"field inpackage.jsonis set as follows (adjust for your repo):
"homepage": "https://ab007shetty.github.io/learnMERN/"- The
dist/folder is included in.gitignoresince it is generated automatically.
If you want to deploy manually instead of relying on GitHub Actions, run:
npm run deployThis builds the app and pushes the dist/ folder to the gh-pages branch on GitHub.
- The workflow file
.github/workflows/deploy.ymlis already included in this repo. - On every push to the
mainbranch, GitHub Actions:- Installs dependencies
- Runs the build script
- Deploys the site to GitHub Pages by pushing the
dist/folder to thegh-pagesbranch
- This means no manual deploy commands needed after setup—just push your code!
Make sure GitHub Pages is configured correctly in your repo:
- Go to Settings > Pages.
- Set Source to:
- Branch:
gh-pages - Folder:
/ (root)
- Branch:
- Save changes.
Your site will then be live at:
https://<your-github-username>.github.io/<repo-name>/
This project is licensed under the MIT License - see the LICENSE file for details.