Debian Codegraph @

.github/workflows/ci.yml

raw
1 name: checks
2 on: [push]
3 jobs:
4 checks:
5 runs-on: ubuntu-latest
6 steps:
7 - uses: actions/checkout@v6
8 - uses: actions/setup-node@v6
9 with:
10 node-version-file: .nvmrc
11 - run: npm ci
12 - run: npx playwright install --with-deps
13 - run: npm run check:types
14 - run: npm run check:lint
15 - run: npm run check:format
16 - run: npm test
17 - run: npm run build
18 - uses: actions/upload-artifact@v7
19 with:
20 path: dist/*
21
22 build-website:
23 if: github.ref == 'refs/heads/main'
24 needs: checks
25 runs-on: ubuntu-latest
26 steps:
27 - uses: actions/checkout@v6
28 - uses: actions/setup-node@v6
29 with:
30 node-version-file: .nvmrc
31 - run: npm install
32 - run: npm run build:example
33 - if: github.ref == 'refs/heads/main'
34 uses: actions/upload-pages-artifact@v5
35 with:
36 path: example/dist/
37
38 deploy-website:
39 if: github.ref == 'refs/heads/main'
40 needs: [checks, build-website]
41 permissions:
42 pages: write
43 id-token: write
44 environment:
45 name: github-pages
46 url: ${{ steps.deployment.outputs.page_url }}
47 runs-on: ubuntu-latest
48 steps:
49 - id: deployment
50 uses: actions/deploy-pages@v5