ΠΠ»Ρ ΡΠ°ΠΉΡΠ° ΠΏΡΠΎΠ΅ΠΊΡΠ° Π²Ρ ΠΌΠΎΠΆΠ΅ΡΠ΅ Π²Π²Π΅ΡΡΠΈ Π»ΡΠ±ΠΎΠ΅ ΠΈΠΌΡ. ΠΠ»Ρ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»ΡΡΠΊΠΎΠ³ΠΎ ΡΠ°ΠΉΡΠ° GitHub ΡΡΠ΅Π±ΡΠ΅Ρ , ΡΡΠΎΠ±Ρ ΠΈΠΌΡ ΡΠ΅ΠΏΠΎΠ·ΠΈΡΠΎΡΠΈΡ ΠΈΠΌΠ΅Π»ΠΎ ΡΠ»Π΅Π΄ΡΡΡΠΈΠΉ ΡΠΎΡΠΌΠ°Ρ: {username}.github.io(Π½Π°ΠΏΡΠΈΠΌΠ΅Ρ gitname.github.io)
npm uninstall @testing-library/jest-dom @testing-library/react @testing-library/user-event web-vitals
npm install gh-pages --save-dev / or -D
ΠΠΎΠ±Π°Π²ΡΡΠ΅ homepageΡΠ²ΠΎΠΉΡΡΠ²ΠΎ Π² ΡΡΠΎΠΌ ΡΠΎΡΠΌΠ°ΡΠ΅*:https://{username}.github.io/{repo-name}
{
"name": "my-app",
"version": "0.1.0",
"homepage": "https://gitname.github.io/react-gh-pages",
"private": true,
"scripts": {
+ "predeploy": "npm run build",
+ "deploy": "gh-pages -d build",
"start": "react-scripts start",
"build": "react-scripts build",
6. ΠΠΎΠ±Π°Π²ΡΡΠ΅ Β«ΡΠ΄Π°Π»Π΅Π½Π½ΡΠΉ ΡΠ΅ΠΏΠΎΠ·ΠΈΡΠΎΡΠΈΠΉΒ» ΠΊ ΡΠ΅Π±Π΅ Π² ΠΏΡΠΎΠ΅ΠΊΡ, ΡΠΊΠ°Π·ΡΠ²Π°ΡΡΠΈΠΉ Π½Π° ΡΠ΅ΠΏΠΎΠ·ΠΈΡΠΎΡΠΈΠΉ GitHub
- git init
- git add .
- git commit -m "first commit"
After t you need add
- git remote add origin https://github.com/{username}/{repo-name}.git
- git branch -M main
- git push -u origin main
- npm run deploy
- ΠΏΠ΅ΡΠ΅ΠΉΠ΄Π΅ΠΌ ΠΏΠΎ ΡΡΡΠ»ΠΊΠ΅ ΠΊΠΎΡΠΎΡΡΡ ΡΠΊΠ°Π·Π°Π»ΠΈ Π² ΡΠ°ΠΉΠ»Π΅ package.json
- "homepage": "https://gitname.github.io/react-gh-pages"