-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (44 loc) · 1.32 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: CI
on: [push]
jobs:
prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: "18"
cache: "pnpm"
- name: Install Dependencies
run: pnpm install
- name: Prettier Lint
run: pnpx prettier . --check --plugin=prettier-plugin-tailwindcss --plugin=prettier-plugin-astro
lighthouseci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 20
- name: Fetch base_ref HEAD to use it as Ancestor hash in LHCI
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
run: git fetch --depth=1 origin +refs/heads/${{github.base_ref}}:refs/remotes/origin/${{github.base_ref}}
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: "18"
cache: "pnpm"
- name: Install and Build
run: |
pnpm install
pnpm run build
- name: Run Lighthouse CI
run: |
pnpm install -g @lhci/cli@0.12.x
lhci autorun
env:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}