-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (46 loc) · 1.44 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
46
47
48
49
50
51
52
53
54
55
56
57
name: CI
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
- main
pull_request:
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
statuses: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: moonrepo/setup-toolchain@v0
with:
auto-install: true
proto-version: 0.34.4
- run: pnpm install
- run: pnpm format:check
- run: pnpm lint
- uses: nexterias/actions-vercel@v1
id: vercel
with:
token: ${{ secrets.VERCEL_TOKEN }}
org-id: ${{ secrets.VERCEL_ORG_ID }}
project-id: ${{ secrets.VERCEL_PROJECT_ID }}
production: ${{ github.ref == 'refs/heads/main' }}
prebuilt: true
- name: Lighthouse CI - Healthcheck
run: pnpm dlx @lhci/[email protected] healthcheck --fatal
- name: Lighthouse CI - Collect
run: |
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
pnpm dlx @lhci/[email protected] collect -n 1 --url https://www.nexterias.dev
else
pnpm dlx @lhci/[email protected] collect -n 1 --url ${{ steps.vercel.outputs.deployment-url }}
fi
- name: Lighthouse CI - Upload
run: pnpm dlx @lhci/[email protected] upload --githubToken ${{ secrets.GITHUB_TOKEN }} --target temporary-public-storage