This project was bootstrapped with Create React App.
Install nvm for Windows or nvm for macOS and Linux.
# Install Node.js 16.14.2 LTS
nvm install 16.14.2
# Use the newly installed version
nvm use 16.14.2
# Install the yarn package manager
npm install -g yarn
Run the follow commands to set up the development environment.
# Clone the repository
git clone https://github.com/cy-cheung/homepage
# Go inside the directory
cd homepage
# Install dependencies
yarn
To start a development version of the app with hot reload support, run:
# Start development server
yarn dev
To start a production version of the app, run:
# Build frontend for production
yarn build
# Start backend production server
yarn start
# Commit and push
git add .
git commit -m "commit changes"
git push
#Install gh-pages
yarn add gh-pages
#Setup gh-pages: Modify package.json
{
"name": "app-name",
+ "homepage": "https://<username>.github.io/<appname>",
// ...
}
{
"scripts": {
+ "predeploy": "npm run build",
+ "deploy": "gh-pages -d build",
"start": "react-scripts start",
"build": "react-scripts build",
// ...
}
}
#Deploy to GitHub page
yarn deploy