A React-based admin dashboard template with automated GitHub deployment.
# Install dependencies (first time only)
npm install
# Run in development mode
npm start
# Opens at http://localhost:3000# Create production build
npm run build
# Serve the production build locally
npx serve -s build
# Opens at http://localhost:3000
# Alternative: Install serve globally
npm install -g serve
serve -s buildThe production build creates optimized static files in the build/ directory that can be deployed to any static hosting service.
# Always work on development branch
git checkout development
git pull origin development
# Make your changes and test locally
npm start
# When ready, commit and push
git add .
git commit -m "Description of changes"
git push origin developmentUse the included deploy script for one-command deployment:
./deploy.shThis script will automatically:
- Check all prerequisites
- Create a pull request
- Merge it to trigger deployment
- Show you the build status URL
First-time setup for automated deployment:
-
Install GitHub CLI:
# Ubuntu/Debian sudo apt update sudo apt install gh # Or using snap sudo snap install gh
-
Authenticate with GitHub:
gh auth login # Choose: GitHub.com → HTTPS → Login with web browser -
Run the deploy script:
./deploy.sh
Step 1: Create Pull Request
- Go directly to: https://github.com/secretzer0/mtnrg/compare/main...development
- Click the green "Create pull request" button
Step 2: Review Your Changes
- Check the title (auto-filled from your commit)
- Add description if needed
- Review the changes shown below
- Click green "Create pull request" button
Step 3: Merge to Production
- Wait for checks to pass (if any)
- Click green "Merge pull request" button
- Click green "Confirm merge" button
- Done! The build starts automatically
- Click the "Actions" tab at the top
- Look for your merge (top of the list)
- ✅ Green check = Success (site is live)
- ❌ Red X = Failed (see below)
- Click the failed workflow to see errors
- Fix locally on development branch
- Push fixes:
git push origin development - Repeat pull request process above
- Test locally:
npm start - Your GitHub repo: https://github.com/secretzer0/mtnrg
- Live site: https://nrg.vyzon.ai
- Working branch:
development(you edit this) - Production branch:
main(never edit directly) - Deploy: Push to development → Pull Request → Merge
- Never commit directly to
main - Always test with
npm run buildlocally before pushing - The build process uses Node.js 24 on GitHub Actions
- Successful builds are automatically deployed to GitHub Pages