{"id":13417052,"url":"https://github.com/pchmn/vite-react-ts-ghactions-template","last_synced_at":"2025-12-27T06:29:18.886Z","repository":{"id":54338507,"uuid":"429540977","full_name":"pchmn/vite-react-ts-ghactions-template","owner":"pchmn","description":"Vite + React v18 + TypeScript + Github Actions Template","archived":false,"fork":false,"pushed_at":"2023-05-04T12:18:26.000Z","size":837,"stargazers_count":47,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-07-30T22:30:44.874Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pchmn.github.io/vite-react-ts-ghactions-template/","language":"HTML","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/pchmn.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}},"created_at":"2021-11-18T18:41:10.000Z","updated_at":"2024-05-31T15:07:16.000Z","dependencies_parsed_at":"2024-01-07T18:03:49.478Z","dependency_job_id":"d8970112-c082-42be-9fb1-3fdb350283ec","html_url":"https://github.com/pchmn/vite-react-ts-ghactions-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pchmn%2Fvite-react-ts-ghactions-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pchmn%2Fvite-react-ts-ghactions-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pchmn%2Fvite-react-ts-ghactions-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pchmn%2Fvite-react-ts-ghactions-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pchmn","download_url":"https://codeload.github.com/pchmn/vite-react-ts-ghactions-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243112190,"owners_count":20238182,"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":[],"created_at":"2024-07-30T22:00:31.869Z","updated_at":"2025-12-27T06:29:18.878Z","avatar_url":"https://github.com/pchmn.png","language":"HTML","funding_links":[],"categories":["Get Started"],"sub_categories":["Templates"],"readme":"\u003cdiv align=\"center\"\u003e\n\n[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/pchmn/vite-react-ts-ghactions-template/blob/main/license)\n[![ci](https://github.com/pchmn/vite-react-ts-ghactions-template/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/pchmn/vite-react-ts-ghactions-template/actions)\n[![codecov.io](https://codecov.io/gh/pchmn/vite-react-ts-ghactions-template/coverage.svg?branch=main)](https://codecov.io/gh/pchmn/vite-react-ts-ghactions-template?branch=master)\n\u003c!-- [![Codacy Badge](https://app.codacy.com/project/badge/Grade/4c695ce061c34c1bb1698acc19278f0e)](https://www.codacy.com/gh/pchmn/vite-react-ts-ghactions-template/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=pchmn/vite-react-ts-ghactions-template\u0026amp;utm_campaign=Badge_Grade) --\u003e\n\n\u003c!-- # React - TypeScript and GitHub Actions Template with Vite --\u003e\n# Vite, React and GitHub Actions\n\nThis a React 18 + TypeScript + Vitest and React Testing Library + GitHub Actions starter template built with Vite.\n\n[Demo](https://pchmn.github.io/vite-react-ts-ghactions-template/)\n\n\u003c/div\u003e\n\n## Features\n### Overview\n\n- ⚡️\u0026nbsp; [Vite 4](https://vitejs.dev/)\n- ⚛️\u0026nbsp; [React 18](https://beta.reactjs.org/) with [TypeScript](https://www.typescriptlang.org/)\n- 🧪\u0026nbsp; [Vitest](https://vitest.dev/) + [React Testing Library](https://testing-library.com/docs/react-testing-library/intro)\n- 🚀\u0026nbsp; [GitHub Actions](https://docs.github.com/en/actions) with deployment on [GitHub Pages](https://pages.github.com/)\n\n### Coding Style\n\n- VSCode settings \u0026 extensions recommendations\n- [EditorConfig](https://editorconfig.org/)\n- [ESLint](https://eslint.org/) \u0026 [Prettier](https://prettier.io/) configured (with [`eslint-plugin-prettier`](https://github.com/prettier/eslint-plugin-prettier))\n\n### Git Hooks\n\n- [Husky](https://typicode.github.io/husky/#/)\n  - [`commitlint`](https://commitlint.js.org/) @ `commit-msg`\n  - [`lint-staged`](https://github.com/okonet/lint-staged) @ `precommit`\n\n### GitHub Actions\n\n- **Build**, **Test** and **Coverage Analysis** (with [Codecov](https://about.codecov.io/)) at each commit\n- **Deploy** to [GitHub Pages](https://pages.github.com/) on main branch (see deployment of this repo [here](https://pchmn.github.io/vite-react-ts-ghactions-template/))\n\n\n\u003cbr\u003e\n\n## Getting Started\n\n### Copy template\n\n```\nnpx degit pchmn/vite-react-ts-ghactions-template app_name\n```\n\n### Usage\n\n\u003e Project was built using [`pnpm`](https://pnpm.io/installation#using-npm). If you want to use `npm` or `yarn`, just don't forget to update GitHub Actions workflow (`.github/workflows/ci.yml`).\n\n#### Install\n\n```sh\npnpm i\n```\n\n#### Dev\n\n```sh\npnpm dev\n```\n\n#### Build\n\n\n```sh\n# normal build\npnpm build\n\n# build with 404.html file added for GitHub Pages\npnpm build:ci\n```\n\u003e See explanation of `404.html` file [here](#github-pages)\n#### Test\n\n```sh\n# without coverage\npnpm test\n\n# with coverage\npnpm test:ci\n```\n#### Serve\n\n```sh\npnpm serve\n```\n\n\u003cbr\u003e\n\n## Configuration for GitHub Actions\n\nIf you want to use GitHub Actions in your repo, you'll need to make little configuration.\n\nActual [workflow](https://github.com/pchmn/vite-react-ts-ghactions-template/blob/main/.github/workflows/ci.yml) is:\n\n![image](https://user-images.githubusercontent.com/12658241/236196559-854755f3-03aa-431d-af43-f7352b40f084.png)\n\n### Build \u0026 Test\n\n\u003e Run on any branch\n\nBuild and test react app.\n\n### Coverage Analysis\n\n\u003e Run on any branch\n\nRun [Codecov](https://about.codecov.io/) analysis.\n\n**Configuration**: \u003cbr\u003e\n[Create a Codecov token](https://docs.codecov.com/docs/quick-start#step-2-get-the-repository-upload-token) for your repo and add it as a `CODECOV_TOKEN` secret in your repo.\n\n### Deploy\n\n\u003e Run only on main branch (manual approve)\n\nDeploy react app to GitHub Pages.\n\n**Configuration**: \u003cbr\u003e\n- Replace `base` config in `vite.config.ts` to match your repo name\n- Manual approve\n  - If you want to keep it, you need to create a [new environment with manual approve](https://devblogs.microsoft.com/devops/i-need-manual-approvers-for-github-actions-and-i-got-them-now/) in your repo, and then replace `environment` config of `deploy` job in `.github/workflows/ci.yml`:\n    - `environment.name` = name of the environment created in your repo\n    - `environment.url` = link to your github pages\n  - If your want to remove it, just delete `environment` config of `deploy` job in `.github/workflows/ci.yml`\n\n## GitHub Pages\n\nThere are modifications on `index.html`, and a new `404.html` file in the project to make it work well with GitHub Pages.\n\n\u003e See https://github.com/rafgraph/spa-github-pages for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpchmn%2Fvite-react-ts-ghactions-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpchmn%2Fvite-react-ts-ghactions-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpchmn%2Fvite-react-ts-ghactions-template/lists"}