Skip to content

Commit 3fc5421

Browse files
committed
fix(ci): migrate GitHub Actions workflow from Deno to Node.js
The project was migrated to Node.js + HonoX + Vite SSG in 9194a0c, but the CI workflow still used Deno commands (deno fmt, deno task), causing build failures. This updates the workflow to use npm commands and applies deno fmt formatting rules that were enforced by CI. Changes: - Remove denoland/setup-deno action - Replace deno commands with npm ci and npm run build - Add npm cache to speed up CI - Apply deno fmt to fix formatting violations Fixes the CI failure in commit b414bfe.
1 parent b414bfe commit 3fc5421

8 files changed

Lines changed: 17 additions & 25 deletions

File tree

.claude/rules/architecture.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,14 @@ npm run build
9292
```
9393

9494
1. **Client Build**: Builds client.ts → dist/static/client.js
95-
2. **SSG Build**: HonoX + Vite SSG generates HTML/JSON/Markdown files (Vite automatically copies public/ to dist/)
95+
2. **SSG Build**: HonoX + Vite SSG generates HTML/JSON/Markdown files (Vite
96+
automatically copies public/ to dist/)
9697
3. **Post-Build**: Renames llms.txt.html → llms.txt, runs Pagefind
9798

9899
## Client-Side Features
99100

100-
The site includes JavaScript functionality (see `app/client.ts` and `app/templates/scripts.ts`):
101+
The site includes JavaScript functionality (see `app/client.ts` and
102+
`app/templates/scripts.ts`):
101103

102104
- **Theme switching**: Light/dark mode with localStorage persistence
103105
- **Code highlighting**: Dynamic highlight.js loading with theme sync

.github/workflows/deploy.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,17 @@ jobs:
2424
steps:
2525
- uses: actions/checkout@v4
2626

27-
- uses: denoland/setup-deno@v2
28-
with:
29-
deno-version: v2.x
30-
3127
- uses: actions/setup-node@v4
3228
with:
3329
node-version: lts/*
30+
cache: npm
3431

35-
- run: npm install -g pagefind
32+
- run: npm ci
3633

37-
- run: deno fmt --check
38-
- run: deno lint
39-
- run: deno task check
40-
41-
- run: deno task build
34+
- run: npm run build
4235
env:
4336
BASE_PATH: /documents
4437

45-
- run: deno task test
46-
4738
# Upload artifact for GitHub Pages
4839
- name: Upload artifact
4940
if: github.ref == 'refs/heads/main' && github.event_name == 'push'

app/routes/AI.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default createRoute(async (c) => {
1717
filePath,
1818
"AI Scenario Testing",
1919
"/AI",
20-
"How to have AI write and run Probitas scenario tests with Claude plugins"
20+
"How to have AI write and run Probitas scenario tests with Claude plugins",
2121
);
2222
return c.html(content);
2323
});

app/routes/api/[package].tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ export default createRoute(
3030
const packageName = c.req.param("package");
3131
const content = await PackagePage({ packageName });
3232
return c.html(content);
33-
}
33+
},
3434
);

app/routes/docs/[slug].tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ export default createRoute(
4242
filePath,
4343
docPage.title,
4444
docPage.path,
45-
docPage.description
45+
docPage.description,
4646
);
4747
return c.html(content);
48-
}
48+
},
4949
);

app/server.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ import { readFile, stat } from "node:fs/promises";
1010
import path from "node:path";
1111
import { fileURLToPath } from "node:url";
1212
import type { PackageDoc } from "../data/api-pages.js";
13-
import { loadPackageDoc as loadPkg, getPackageGroups } from "../data/api-pages.js";
13+
import {
14+
getPackageGroups,
15+
loadPackageDoc as loadPkg,
16+
} from "../data/api-pages.js";
1417
import { generateApiMarkdown } from "./lib/api-markdown.js";
1518
import { rewriteMarkdownLinks } from "./lib/markdown.js";
1619
import { generateLlmsTxt } from "./lib/llms.js";

app/templates/docs/MarkdownDoc.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@
33
*/
44
import { readFile } from "node:fs/promises";
55
import { basePath } from "../../lib/path.ts";
6-
import {
7-
extractTitle,
8-
extractToc,
9-
parseMarkdown,
10-
} from "../../lib/markdown.ts";
6+
import { extractTitle, extractToc, parseMarkdown } from "../../lib/markdown.ts";
117
import { DocLayout, TableOfContents } from "../components.tsx";
128
import { Layout } from "../Layout.tsx";
139

data/api-pages.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
} from "../app/lib/api-docs.js";
1616

1717
// Re-export for convenience
18-
export type { PackageDoc, PackageInfo, ApiDocsIndex };
18+
export type { ApiDocsIndex, PackageDoc, PackageInfo };
1919

2020
const __filename = fileURLToPath(import.meta.url);
2121
const __dirname = path.dirname(__filename);

0 commit comments

Comments
 (0)