{"id":22266043,"url":"https://github.com/muhdhanish/git_actions_reactjs","last_synced_at":"2026-04-13T04:04:07.118Z","repository":{"id":215637921,"uuid":"739424531","full_name":"MuhdHanish/git_actions_reactjs","owner":"MuhdHanish","description":"This repository is a hands-on guide for learning Continuous Integration and Continuous Deployment (CI/CD) practices with a React app developed using Vite  With a focus on GitHub Pages. ","archived":false,"fork":false,"pushed_at":"2024-01-05T16:20:12.000Z","size":148,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T14:21:53.704Z","etag":null,"topics":["cicd-pipeline","github-actions","github-pages","reactjs","typescript","vitejs"],"latest_commit_sha":null,"homepage":"","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MuhdHanish.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2024-01-05T14:34:35.000Z","updated_at":"2024-01-13T11:19:30.000Z","dependencies_parsed_at":"2024-01-05T16:27:27.067Z","dependency_job_id":"9da64e84-8547-4e06-995f-816231dc072b","html_url":"https://github.com/MuhdHanish/git_actions_reactjs","commit_stats":null,"previous_names":["muhdhanish/git_actions_reactjs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MuhdHanish/git_actions_reactjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MuhdHanish%2Fgit_actions_reactjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MuhdHanish%2Fgit_actions_reactjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MuhdHanish%2Fgit_actions_reactjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MuhdHanish%2Fgit_actions_reactjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MuhdHanish","download_url":"https://codeload.github.com/MuhdHanish/git_actions_reactjs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MuhdHanish%2Fgit_actions_reactjs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001101,"owners_count":26082991,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cicd-pipeline","github-actions","github-pages","reactjs","typescript","vitejs"],"created_at":"2024-12-03T10:17:33.366Z","updated_at":"2025-10-09T08:15:06.326Z","avatar_url":"https://github.com/MuhdHanish.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003ch2\u003e⚜️ V I T E \u0026nbsp; D E P L O Y ⚜️\u003c/h2\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n#### 01. Create a vite react app\n```npm\nnpm create vite@latest\n```\n\n#### 02. Create a new repository on GitHub and initialize GIT\n```git\ngit init \ngit add . \ngit commit -m \"add: initial files\" \ngit branch -M main \ngit remote add origin https://github.com/[USER]/[REPO_NAME] \ngit push -u origin main\n```\n\n#### 03. Setup base in *vite.config*\n```js\nbase: \"/[REPO_NAME]/\"\n```\n\n#### 04. Create ./github/workflows/deploy.yml and add the code bellow\n\u003e [!WARNING]\n\u003e It is crucial that the `.yml` file has the exact code below. Any typing or spacing errors may cause deployment issues.\n```yml\nname: Deploy\n\non:\n  push:\n    branches:\n      - main\n\njobs:\n  build:\n    name: Build\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: Checkout repo\n        uses: actions/checkout@v2\n\n      - name: Setup Node\n        uses: actions/setup-node@v1\n        with:\n          node-version: 16\n\n      - name: Install dependencies\n        uses: bahmutov/npm-install@v1\n\n      - name: Build project\n        run: npm run build\n\n      - name: Upload production-ready build files\n        uses: actions/upload-artifact@v2\n        with:\n          name: production-files\n          path: ./dist\n\n  deploy:\n    name: Deploy\n    needs: build\n    runs-on: ubuntu-latest\n    if: github.ref == 'refs/heads/main'\n\n    steps:\n      - name: Download artifact\n        uses: actions/download-artifact@v2\n        with:\n          name: production-files\n          path: ./dist\n\n      - name: Deploy to GitHub Pages\n        uses: peaceiris/actions-gh-pages@v3\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n          publish_dir: ./dist\n```\n\n#### 05. Push to GitHub\n```git\ngit add . \ngit commit -m \"add: deploy workflow\" \ngit push\n```\n\n#### 06. Active workflow (GitHub)\n```\nConfig \u003e Actions \u003e General \u003e Workflow permissions \u003e Read and Write permissions \n```\n```\nActions \u003e failed deploy \u003e re-run-job failed jobs \n```\n```\nPages \u003e gh-pages \u003e save\n```\n\n## 🛠 Helper\n\n#### \u003e For code changes\nWhenever you push to GitHub, it will deploy automatically.\n```git\ngit add . \ngit commit -m \"fix: some bug\" \ngit push\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuhdhanish%2Fgit_actions_reactjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuhdhanish%2Fgit_actions_reactjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuhdhanish%2Fgit_actions_reactjs/lists"}