Repository navigation
70 lines (57 loc) · 1.59 KB
/
Copy pathci.yml
File metadata and controls
70 lines (57 loc) · 1.59 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
name: CI
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
check:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 22
cache: npm
- run: npm ci
- run: npm run lint
- run: npm run format:check
- run: npx playwright install --with-deps chromium firefox webkit
- run: npm test
- name: Upload Playwright traces on failure
if: failure()
uses: actions/upload-artifact@v7
with:
name: playwright-test-results
path: test-results/
retention-days: 7
# Publishes the site only after the checks above pass, and only the files
# the page needs.
deploy:
needs: check
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v7
- name: Collect site files
run: |
mkdir _site
cp index.html theme.js texts.js wordlists.js script.js style.css sw.js manifest.webmanifest preview.png robots.txt _site/
cp -r fonts icons books _site/
- uses: actions/upload-pages-artifact@v5
with:
path: _site
- id: deployment
uses: actions/deploy-pages@v5