Remove unnecessary workflow
This commit is contained in:
parent
6b503f7608
commit
fe99988a4c
48
.github/workflows/vite-react-ts-setup.yml
vendored
48
.github/workflows/vite-react-ts-setup.yml
vendored
@ -1,48 +0,0 @@
|
||||
name: Setup Vite React TS Project
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 'lts/*'
|
||||
|
||||
- name: Install Yarn
|
||||
run: npm install -g yarn
|
||||
|
||||
- name: Create Vite Project
|
||||
run: npx create-vite . --template react-ts
|
||||
|
||||
- name: Install ESlint and Prettier
|
||||
run: |
|
||||
yarn add --dev eslint prettier eslint-config-prettier eslint-plugin-prettier eslint-plugin-react @typescript-eslint/eslint-plugin @typescript-eslint/parser husky lint-staged
|
||||
|
||||
- name: Update package.json scripts
|
||||
run: |
|
||||
echo $(jq '.scripts.prettier="prettier \"src/**/*.{js,jsx,ts,tsx,css,scss,md}\" --write"' package.json) > package.json
|
||||
echo $(jq '.scripts["format:check"]="yarn prettier -- --check"' package.json) > package.json
|
||||
echo $(jq '.scripts["format:write"]="yarn prettier -- --write"' package.json) > package.json
|
||||
echo $(jq '.scripts["types:check"]="tsc --noEmit --pretty"' package.json) > package.json
|
||||
echo $(jq '.scripts.lint="eslint --ext .js,.jsx,.ts,.tsx src --no-error-on-unmatched-pattern"' package.json) > package.json
|
||||
echo $(jq '.scripts["lint:fix"]="eslint --ext .js,.jsx,.ts,.tsx src --fix --no-error-on-unmatched-pattern"' package.json) > package.json
|
||||
echo $(jq '.scripts.fix="yarn format:write && yarn lint:fix"' package.json) > package.json
|
||||
|
||||
- name: Commit and Push
|
||||
run: |
|
||||
git config --global user.name "JKlancer"
|
||||
git config --global user.email "jasonzhuyq@outlook.com"
|
||||
git remote set-url origin https://x-access-token:${{ secrets.GITHUBACTION }}@github.com/JokeJason/react-ts-vite-starter-kit.git
|
||||
git add .
|
||||
git commit -m "Setup project with Vite, React-TS, ESLint, and Prettier"
|
||||
git push
|
Loading…
x
Reference in New Issue
Block a user