Skip to content

Commit 226cb73

Browse files
deploy docs
1 parent 5e52bfd commit 226cb73

File tree

7 files changed

+1926
-942
lines changed

7 files changed

+1926
-942
lines changed

.github/workflows/deploy.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
# Enabled permissions on GITHUB_TOKEN
9+
permissions:
10+
# To be able to push to the repo
11+
contents: write
12+
# To update the pr description with canary info
13+
pull-requests: write
14+
# For pr-check to create a status
15+
statuses: write
16+
# Needed to create PR statuses/checks
17+
checks: write
18+
# To post comments on PRs
19+
issues: write
20+
# Astro deploy
21+
pages: write
22+
id-token: write
23+
24+
jobs:
25+
build:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v3
29+
- uses: ./.github/actions/install-deps
30+
- name: Install, build, and upload your site
31+
uses: withastro/action@v2
32+
with:
33+
path: packages/docs
34+
node-version: 18
35+
package-manager: [email protected]
36+
37+
deploy:
38+
needs: build
39+
runs-on: ubuntu-latest
40+
environment:
41+
name: github-pages
42+
url: ${{ steps.deployment.outputs.page_url }}
43+
steps:
44+
- name: Deploy to GitHub Pages
45+
id: deployment
46+
uses: actions/deploy-pages@v4

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"node": ">=18"
88
},
99
"scripts": {
10-
"build": "turbo run build",
10+
"build": "turbo run build --filter=!docs",
1111
"dev": "turbo run dev",
1212
"lint": "turbo run lint",
1313
"test": "turbo run test -- --watch=false",

packages/docs/astro.config.mjs

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ import starlight from "@astrojs/starlight";
33
import starlightTypeDoc, { typeDocSidebarGroup } from "starlight-typedoc";
44
import react from "@astrojs/react";
55
import path from "path";
6-
import { NodeGlobalsPolyfillPlugin } from "@esbuild-plugins/node-globals-polyfill";
76

87
export default defineConfig({
8+
site: "https://jimp-dev.github.io",
9+
base: "jimp",
910
integrations: [
1011
react(),
1112
starlight({

packages/docs/package.json

+10-14
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,35 @@
11
{
22
"name": "@jimp/docs",
33
"private": true,
4-
"type": "module",
54
"version": "1.0.2",
5+
"type": "module",
66
"scripts": {
77
"dev": "astro dev",
88
"start": "astro dev",
9-
"build-website": "rm -rf dist && astro check && astro build",
9+
"build": "rm -rf dist && astro check && astro build",
1010
"preview": "astro preview",
1111
"astro": "astro"
1212
},
1313
"dependencies": {
14-
"@astrojs/check": "^0.5.10",
15-
"@astrojs/react": "^3.1.0",
16-
"@astrojs/starlight": "^0.21.2",
14+
"@astrojs/check": "^0.9.3",
15+
"@astrojs/react": "^3.6.2",
16+
"@astrojs/starlight": "^0.26.1",
1717
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
1818
"@jimp/core": "workspace:*",
1919
"@jimp/plugin-print": "workspace:*",
20-
"astro": "^4.3.5",
20+
"astro": "^4.15.1",
2121
"eslint": "^8.57.0",
2222
"jimp": "workspace:*",
2323
"react": "^18.2.0",
2424
"react-dom": "^18.2.0",
2525
"sharp": "^0.32.5",
26-
"starlight-typedoc": "^0.10.0",
27-
"typedoc": "^0.25.12",
28-
"typedoc-plugin-markdown": "next",
26+
"starlight-typedoc": "^0.15.0",
27+
"typedoc": "^0.26.6",
28+
"typedoc-plugin-markdown": "4.2.6",
2929
"typedoc-plugin-zod": "^1.1.2",
3030
"typescript": "^5.4.3"
3131
},
3232
"devDependencies": {
3333
"@types/react": "^18.2.73"
34-
},
35-
"publishConfig": {
36-
"access": "public"
37-
},
38-
"sideEffects": false
34+
}
3935
}

packages/docs/src/typedoc-plugin.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ export function load(app) {
55
const needsUpdate = new Set();
66

77
const commentMap = new Map();
8-
const needComment = new Set();
98

109
let jimpClass;
1110
let options;
1211

1312
app.converter.on(Converter.EVENT_CREATE_SIGNATURE, onCreateDeclaration);
14-
app.converter.on(Converter.EVENT_CREATE_DECLARATION, (c, r) => {
13+
app.converter.on(Converter.EVENT_CREATE_DECLARATION, (_, r) => {
1514
if (r.name === "JimpConstructorOptions") {
1615
options = r;
1716
}
@@ -64,7 +63,7 @@ export function load(app) {
6463
}
6564
}
6665

67-
app.converter.on(Converter.EVENT_END, (context) => {
66+
app.converter.on(Converter.EVENT_END, () => {
6867
for (const refOrig of needsUpdate) {
6968
const i = fullSignaturePath.get(refOrig.name);
7069

packages/docs/src/typedoc-zod-extended.js

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
import {
2-
Converter,
3-
ReflectionKind,
4-
ReferenceType,
5-
TypeScript,
6-
Comment,
7-
} from "typedoc";
1+
import { Converter, TypeScript, Comment } from "typedoc";
82

93
function sourceKey(source) {
104
return source.fileName + ":" + source.line + ":" + source.character;
@@ -38,7 +32,7 @@ export function load(app) {
3832
toUpdate.set(key, options);
3933
});
4034

41-
function onCreateDeclaration(context, refl) {
35+
function onCreateDeclaration(_, refl) {
4236
console.log(refl.name);
4337
if (refl.name.endsWith("Options")) {
4438
const declaration = refl.project

0 commit comments

Comments
 (0)