{"id":21877437,"url":"https://github.com/erabossid/react-gh-pages","last_synced_at":"2025-03-10T14:23:15.910Z","repository":{"id":166676990,"uuid":"294011309","full_name":"erabosscode/react-gh-pages","owner":"erabosscode","description":"Deploy your react-app to gh-pages","archived":false,"fork":false,"pushed_at":"2020-12-24T17:10:40.000Z","size":333,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-02-07T02:22:54.594Z","etag":null,"topics":["deploy","gh-pages","reactjs"],"latest_commit_sha":null,"homepage":"https://tradecoder.github.io/react-gh-pages","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erabosscode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-09T05:25:27.000Z","updated_at":"2021-03-23T09:00:44.000Z","dependencies_parsed_at":"2023-06-01T14:15:18.701Z","dependency_job_id":null,"html_url":"https://github.com/erabosscode/react-gh-pages","commit_stats":null,"previous_names":["tradecoder/react-gh-pages","logixmaster/react-gh-pages","mydigita/react-gh-pages","erabossid/react-gh-pages","erabosstt/react-gh-pages","erabosscode/react-gh-pages"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erabosscode%2Freact-gh-pages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erabosscode%2Freact-gh-pages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erabosscode%2Freact-gh-pages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erabosscode%2Freact-gh-pages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erabosscode","download_url":"https://codeload.github.com/erabosscode/react-gh-pages/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242865102,"owners_count":20197836,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deploy","gh-pages","reactjs"],"created_at":"2024-11-28T08:09:16.897Z","updated_at":"2025-03-10T14:23:15.892Z","avatar_url":"https://github.com/erabosscode.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deploy your React App to gh-pages\n\nBootstrapped by `create-react-app`\n\n## Make an empty repo on github (no file)\n\n## Install the app using this command\n\n```javascript\nnpx create-react-app yourprojectname\n```\n## Go to your project\n\n```javascript\ncd yourprojectname\n```\n\n## Intall gh-pages\n\n```javascript\nnpm install gh-pages\n```\n## Add a homepage to `package.json`\n\n```javascript\n\"homepage\":\"https://yourgithubusername.github.io/yourprojectname\"\n\n// example:\n\"homepage\":\"https://tradecoder.github.io/react-gh-pages\"\n```\n\n## Add the following code to the script section of `package.json`\n\n```javascript\n\"predeploy\":\"npm run build\",\n\"deploy\":\"gh-pages -d build\"\n```\n\nIf you do not delete any code from the package.json file from the script,\nyour code may look like this after adding the above properties\n\n```javascript\n \"scripts\": {\n    \"start\": \"react-scripts start\",\n    \"build\": \"react-scripts build\",\n    \"test\": \"react-scripts test\",\n    \"eject\": \"react-scripts eject\",\n    \"predeploy\":\"npm run build\",\n    \"deploy\":\"gh-pages -d build\"\n  }\n```\n\n## Create a git repo \n\n```javascript\ngit init\n```\n\n## Add your github project remote url\n\n```javascript\ngit remote add origin https://github.com/yourgithubusername/yourprojectname.git\n\n// We are adding our own\n\ngit remote add origin https://github.com/tradecoder/react-gh-pages\n```\n\n## Setup is ok, now deploy your app to github gh-pages\n\n```javascript\nnpm run deploy\n```\nVisit your project using the homepage you set earlier\n\n## Upload the source code to github\nAdd all the changes in your project\n\n```javascript\ngit add --all\n ```\n Commit with a message\n \n```javascript\ngit commit -m 'your message here'\n```\nPush your source codes to your github project\n\n```javascript\ngit push origin master\n```\nSource code uploaded to your github master branch\n\n## Done\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferabossid%2Freact-gh-pages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferabossid%2Freact-gh-pages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferabossid%2Freact-gh-pages/lists"}