Skip to content

Commit 5bb525d

Browse files
committed
deploy
1 parent 02cc8b7 commit 5bb525d

File tree

5 files changed

+61
-7
lines changed

5 files changed

+61
-7
lines changed

.github/workflows/deploy.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Deploy
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [main]
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
# Build job
13+
build:
14+
# Specify runner + build & upload the static files as an artifact
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
22+
with:
23+
node-version: lts/*
24+
cache: 'npm'
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
- name: Build
30+
run: mkdir out && npm run build
31+
32+
- name: Upload static files as artifact
33+
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
34+
with:
35+
path: out/
36+
37+
deploy:
38+
needs: build
39+
40+
permissions:
41+
pages: write
42+
id-token: write
43+
44+
environment:
45+
name: github-pages
46+
url: ${{ steps.deployment.outputs.page_url }}
47+
48+
runs-on: ubuntu-latest
49+
steps:
50+
- name: Deploy to GitHub Pages
51+
id: deployment
52+
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
node_modules
2-
out
2+
out
3+
generated-*
4+
webpack

generate-md.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ const __filename = fileURLToPath(import.meta.url);
77
const __dirname = dirname(__filename);
88

99
// Define all paths relative to the current file
10-
const entryPointsPath = resolve(__dirname, "../webpack/types.d.ts");
10+
const entryPointsPath = resolve(__dirname, "./webpack/types.d.ts");
1111
const tsconfigPath = resolve(__dirname, "./tsconfig.json");
1212
const dockitTheme = resolve(__dirname, "./plugins/theme/index.mjs");
1313
const consolidationPlugin = resolve(__dirname, "./plugins/consolidation.mjs");
1414

1515
Application.bootstrapWithPlugins({
1616
entryPoints: [entryPointsPath],
17-
out: "api",
17+
out: "generated-api",
1818

1919
// Plugins
2020
plugin: ["typedoc-plugin-markdown", consolidationPlugin, dockitTheme],

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"scripts": {
3-
"build": "node generate-md.mjs && doc-kit generate -t web -i api/webpack/namespaces/*.md -o out"
3+
"build": "node generate-md.mjs && mkdir -p out && doc-kit generate -t web -i api/webpack/namespaces/*.md -o out"
44
},
55
"devDependencies": {
66
"@node-core/doc-kit": "^1.0.1",

tsconfig.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"include": [
3-
"../webpack/lib/**/*",
4-
"../webpack/declarations/lib/**/*",
5-
"../webpack/types.d.ts"
3+
"./webpack/lib/**/*",
4+
"./webpack/declarations/lib/**/*",
5+
"./webpack/types.d.ts"
66
],
77
"compilerOptions": {
88
"allowJs": true,

0 commit comments

Comments
 (0)