Skip to content

Commit 0082062

Browse files
committed
feat: vite docs site
1 parent 2d44a90 commit 0082062

29 files changed

Lines changed: 3519 additions & 1259 deletions

.github/workflows/pages.yml

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Deploy Docs (GitHub Pages)
22

33
on:
44
push:
5-
branches: ["main"]
5+
branches: [ "main" ]
66
workflow_dispatch: {}
77

88
permissions:
@@ -22,30 +22,37 @@ jobs:
2222
# suite expects EET/EEST semantics (UTC+2/UTC+3).
2323
TZ: Europe/Bucharest
2424
steps:
25-
- name: Checkout
26-
uses: actions/checkout@v4
25+
- name: Checkout
26+
uses: actions/checkout@v4
2727

28-
- name: Setup Deno
29-
uses: denoland/setup-deno@v2
30-
with:
31-
deno-version: v2.x
28+
- name: Setup Deno
29+
uses: denoland/setup-deno@v2
30+
with:
31+
deno-version: v2.x
3232

33-
- name: Test
34-
run: deno task test
33+
- name: Setup Node.js
34+
uses: actions/setup-node@v4
35+
with:
36+
node-version: 22
3537

36-
- name: Build docs bundle
37-
run: deno task docs:bundle
38+
- name: Test
39+
run: deno task test
3840

39-
- name: Stamp build SHA (cache bust)
40-
run: sed -i "s/__BUILD_SHA__/${GITHUB_SHA}/g" docs/index.html
41+
- name: Install docs dependencies
42+
run: npm ci
43+
working-directory: docs
4144

42-
- name: Configure Pages
43-
uses: actions/configure-pages@v5
45+
- name: Build docs
46+
run: npm run build
47+
working-directory: docs
4448

45-
- name: Upload artifact
46-
uses: actions/upload-pages-artifact@v3
47-
with:
48-
path: docs
49+
- name: Configure Pages
50+
uses: actions/configure-pages@v5
51+
52+
- name: Upload artifact
53+
uses: actions/upload-pages-artifact@v3
54+
with:
55+
path: docs/dist
4956

5057
deploy:
5158
needs: build
@@ -54,6 +61,6 @@ jobs:
5461
name: github-pages
5562
url: ${{ steps.deployment.outputs.page_url }}
5663
steps:
57-
- name: Deploy to GitHub Pages
58-
id: deployment
59-
uses: actions/deploy-pages@v4
64+
- name: Deploy to GitHub Pages
65+
id: deployment
66+
uses: actions/deploy-pages@v4

deno.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
"lint": "deno lint",
2929
"check": "deno check mod.ts",
3030
"update:data": "deno run -A scripts/update_data.ts",
31-
"test": "deno test",
32-
"docs:bundle": "deno bundle --platform=browser mod.ts -o docs/vendor/ts-duckling.js",
33-
"docs:serve": "deno task docs:bundle && deno run -A jsr:@std/http/file-server docs --host 127.0.0.1 --port 8000"
34-
}
31+
"test": "deno test"
32+
},
33+
"exclude": ["./docs"]
3534
}

docs/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
dist
3+
.npmrc

0 commit comments

Comments
 (0)