- Delete all files in
main
branch, preferably using the GitHub website. - Save/Copy/Remove all local files and directories pertaining to this repository.
- Clone repo to local machine.
cd
into the cloned repo directory on local machine.- Run
npx create-react-app .
to create react app in current directory.- Reference used: https://stackoverflow.com/a/69233517/17047816
~/GitHub > git clone https://github.com/AlTimofeyev/portfolio.git portfolio ~/GitHub > cd portfolio ~/GitHub/portfolio > npx create-react-app . ~/GitHub/portfolio > code .
- Install gh-pages and all necessary packages.
- Add
homepage
name,predeploy
script anddeploy
script topackage.json
file.{ "homepage": "https://AlTimofeyev.github.io/portfolio", "name": "portfolio", "version": "0.1.0", [... all other json data ...] "scripts": { "predeploy": "npm run build", "deploy": "gh-pages -d build", "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" }, [... all other json data ...] }
- Continue working on react app locally and
git push
updates tomain
branch when finished. - Use the command
npm run deploy
in local portfolio directory (main
branch) to publish updates to GitHub Pages.~/GitHub/portfolio > npm run deploy
- Continue working on react app locally and
git push
updates tomain
branch when finished. - Use the command
npm run deploy
in local portfolio directory (main
branch) to publish updates to GitHub Pages.
This project was bootstrapped with Create React App.
In the project directory, you can run:
Runs the app in the development mode.
Open https://localhost:3000 to view it in your browser.
The page will reload when you make changes.
You may also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames