Skip to content

Commit fe80d39

Browse files
committed
fix: github actions
1 parent aa95277 commit fe80d39

11 files changed

Lines changed: 92 additions & 42 deletions

File tree

.github/workflows/pages.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Deploy documentation to GitHub Pages
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
- master
9+
- rewrite
10+
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
concurrency:
17+
group: pages
18+
cancel-in-progress: false
19+
20+
jobs:
21+
build:
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- uses: actions/setup-node@v4
28+
with:
29+
node-version: 24
30+
31+
- uses: oven-sh/setup-bun@v2
32+
with:
33+
bun-version: latest
34+
35+
- run: bun install --frozen-lockfile
36+
37+
- run: bun run type-check
38+
39+
- run: bun run build
40+
env:
41+
GITHUB_PAGES: 'true'
42+
43+
- run: touch out/.nojekyll
44+
45+
- uses: actions/configure-pages@v5
46+
47+
- uses: actions/upload-pages-artifact@v3
48+
with:
49+
path: out
50+
51+
deploy:
52+
runs-on: ubuntu-latest
53+
needs: build
54+
environment:
55+
name: github-pages
56+
url: ${{ steps.deployment.outputs.page_url }}
57+
58+
steps:
59+
- id: deployment
60+
uses: actions/deploy-pages@v4

.github/workflows/retype-action.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
node_modules/
2-
.github/
32
.next/
3+
out/
44
.source/
55
.claude/
66
.vercel
7+
tsconfig.tsbuildinfo

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ bun run build
4545
bun run start
4646
```
4747

48+
### GitHub Pages
49+
50+
GitHub Pages is deployed by `.github/workflows/pages.yml`. The workflow builds the Next.js app with `GITHUB_PAGES=true`, which enables static export, writes the site to `out/`, and deploys that artifact with GitHub Pages Actions.
51+
4852
## Project Structure
4953

5054
```

bun.lock

Lines changed: 3 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

content/docs/source/block-cube.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,7 @@ func (Rotation) Neg() Rotation
848848
```
849849

850850
Neg returns the negation of the Rotation. It is equivalent to creating a new
851-
Rotation{-r[0], -r[1]}.
851+
`Rotation{-r[0], -r[1]}`.
852852
853853
</Accordion>
854854

content/docs/source/entity-effect.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func Register(id int, e Type)
4646

4747
Register registers an Effect with a specific ID to translate from and to on disk and network. An Effect
4848
instance may be created by creating a struct instance in this package like
49-
effect.regeneration{}.
49+
`effect.regeneration{}`.
5050
5151
</Accordion>
5252

content/docs/source/item.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ func RegisterEnchantment(id int, enchantment EnchantmentType)
203203

204204

205205
RegisterEnchantment registers an enchantment with the ID passed. Once registered, enchantments may be received
206-
by instantiating an EnchantmentType struct (e.g. enchantment.Protection{})
206+
by instantiating an EnchantmentType struct (e.g. `enchantment.Protection{}`)
207207
208208
</Accordion>
209209

next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3-
import "./.next/types/routes.d.ts";
3+
import "./.next/dev/types/routes.d.ts";
44

55
// NOTE: This file should not be edited
66
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

next.config.js

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,30 @@ const { createMDX } = require('fumadocs-mdx/next');
22

33
const withMDX = createMDX();
44

5+
const isGithubPages = process.env.GITHUB_PAGES === 'true';
6+
57
/** @type {import('next').NextConfig} */
68
const nextConfig = {
79
reactStrictMode: true,
10+
...(isGithubPages && {
11+
output: 'export',
12+
basePath: '/docs',
13+
trailingSlash: true,
14+
}),
815
experimental: {
916
optimizePackageImports: ['lucide-react', 'geist'],
1017
},
1118
images: {
12-
domains: ['github.com', 'discord.com', 'user-images.githubusercontent.com', 'discordapp.com', 'avatars.githubusercontent.com', 'go.dev'],
19+
unoptimized: isGithubPages,
20+
remotePatterns: [
21+
{ protocol: 'https', hostname: 'github.com' },
22+
{ protocol: 'https', hostname: 'discord.com' },
23+
{ protocol: 'https', hostname: 'user-images.githubusercontent.com' },
24+
{ protocol: 'https', hostname: 'discordapp.com' },
25+
{ protocol: 'https', hostname: 'avatars.githubusercontent.com' },
26+
{ protocol: 'https', hostname: 'go.dev' },
27+
],
1328
},
1429
};
1530

16-
module.exports = withMDX(nextConfig);
31+
module.exports = withMDX(nextConfig);

0 commit comments

Comments
 (0)