A quick and easy way to bootstrap and deploy a React app to GitHub Pages.
This project uses TypeScript & Material-UI and bootstrapped with Create React App.
Inspired by scaffold-eth by austintgriffith.
For additional info, I wrote an article here.
First, you'll need NodeJS>=10 and Git installed.
⛽ Propellant Tank Fill
git clone https://github.com/easonchai/launchpad.git
cd launchpad
npm install
⚡ Activate Orbiter's Fuel Cells
npm start
⚛ The React App should be running on http://localhost:3000. Open the link to view it in the browser (or it should open automatically).
🖥 Align Flight Computers
📑 Create a GitHub repo and change the 'homepage' attribute in package.json to:
"homepage": "https://<username>.github.io/<repo-name>"
You should be able to find this in the root directory of the cloned repo
🛰️ Comms. Check
📡 Ensure you have connected your working directory to GitHub by running:
git remote rm origin
git remote add origin <remote repository URL>
git push origin master
The remote repository URL can be found on your repo's main page by clicking the 'Clone or download' button and usually looks like
https://github.com/username/repo-name.git
📀 Transition to launch configuration
📦
npm run deploy
This will automatically create a new branch in your repo named 'gh-pages'
🔥 Ignition
⚙ Setup GitHub pages source.
Head to your repo > Settings (top right, under ☆ Star) > scroll down to GitHub Pages > Source > change to 'gh-pages'
Your site should be up and running on https://username.github.io/repo-name! Way to go!
Now you're one step closer to showing the world your creation!