feat(ci): add ci lol
This commit is contained in:
parent
b98b6f084a
commit
28c3cfcf6d
2 changed files with 44 additions and 2 deletions
38
.github/workflows/ci.yaml
vendored
Normal file
38
.github/workflows/ci.yaml
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup PNPM
|
||||||
|
uses: pnpm/action-setup@v4
|
||||||
|
with:
|
||||||
|
version: 10
|
||||||
|
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
cache: "pnpm"
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install
|
||||||
|
|
||||||
|
- name: Prettier check
|
||||||
|
run: pnpm prettier --check .
|
||||||
|
|
||||||
|
- name: Astro check
|
||||||
|
run: pnpm astro check
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: pnpm build
|
||||||
|
|
@ -7,10 +7,14 @@
|
||||||
"build": "astro build",
|
"build": "astro build",
|
||||||
"preview": "astro preview",
|
"preview": "astro preview",
|
||||||
"astro": "astro",
|
"astro": "astro",
|
||||||
"prepare": "husky"
|
"prepare": "husky",
|
||||||
|
"check": "astro check"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.{js,ts,jsx,tsx,astro,html,md,json,yml,yaml}": "prettier --write"
|
"*.{js,ts,jsx,tsx,astro,html,md,json,yml,yaml}": [
|
||||||
|
"prettier --write",
|
||||||
|
"astro check --minimumSeverity warning"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/mdx": "^4.3.6",
|
"@astrojs/mdx": "^4.3.6",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue