mirror of
https://github.com/luxfi/docs.git
synced 2026-09-24 00:25:32 +00:00
ci: deploy to GitHub Pages
- Configure Next.js for static export (output: 'export') - Update workflow for GitHub Pages deployment - Remove rewrites (not supported with static export)
This commit is contained in:
+1
-1
@@ -7,6 +7,6 @@ const create = browser<typeof Config, import("@hanzo/docs-mdx/runtime/types").In
|
||||
}
|
||||
}>();
|
||||
const browserCollections = {
|
||||
docs: create.doc("docs", {"index.mdx": () => import("../content/docs/index.mdx?collection=docs"), "build/index.mdx": () => import("../content/docs/build/index.mdx?collection=docs"), "learn/architecture.mdx": () => import("../content/docs/learn/architecture.mdx?collection=docs"), "learn/index.mdx": () => import("../content/docs/learn/index.mdx?collection=docs"), "learn/tokenomics.mdx": () => import("../content/docs/learn/tokenomics.mdx?collection=docs"), "nodes/index.mdx": () => import("../content/docs/nodes/index.mdx?collection=docs"), "reference/index.mdx": () => import("../content/docs/reference/index.mdx?collection=docs"), }),
|
||||
docs: create.doc("docs", {"index.mdx": () => import("../content/docs/index.mdx?collection=docs"), "build/index.mdx": () => import("../content/docs/build/index.mdx?collection=docs"), "learn/architecture.mdx": () => import("../content/docs/learn/architecture.mdx?collection=docs"), "learn/index.mdx": () => import("../content/docs/learn/index.mdx?collection=docs"), "learn/tokenomics.mdx": () => import("../content/docs/learn/tokenomics.mdx?collection=docs"), "reference/index.mdx": () => import("../content/docs/reference/index.mdx?collection=docs"), "nodes/index.mdx": () => import("../content/docs/nodes/index.mdx?collection=docs"), }),
|
||||
};
|
||||
export default browserCollections;
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
// @ts-nocheck
|
||||
import { frontmatter as __fd_glob_11 } from "../content/docs/reference/index.mdx?collection=docs&only=frontmatter"
|
||||
import { frontmatter as __fd_glob_10 } from "../content/docs/nodes/index.mdx?collection=docs&only=frontmatter"
|
||||
import { frontmatter as __fd_glob_11 } from "../content/docs/nodes/index.mdx?collection=docs&only=frontmatter"
|
||||
import { frontmatter as __fd_glob_10 } from "../content/docs/reference/index.mdx?collection=docs&only=frontmatter"
|
||||
import { frontmatter as __fd_glob_9 } from "../content/docs/learn/tokenomics.mdx?collection=docs&only=frontmatter"
|
||||
import { frontmatter as __fd_glob_8 } from "../content/docs/learn/index.mdx?collection=docs&only=frontmatter"
|
||||
import { frontmatter as __fd_glob_7 } from "../content/docs/learn/architecture.mdx?collection=docs&only=frontmatter"
|
||||
@@ -19,4 +19,4 @@ const create = server<typeof Config, import("@hanzo/docs-mdx/runtime/types").Int
|
||||
}
|
||||
}>({"doc":{"passthroughs":["extractedReferences"]}});
|
||||
|
||||
export const docs = await create.docsLazy("docs", "content/docs", {"meta.json": __fd_glob_0, "build/meta.json": __fd_glob_1, "learn/meta.json": __fd_glob_2, "nodes/meta.json": __fd_glob_3, "reference/meta.json": __fd_glob_4, }, {"index.mdx": __fd_glob_5, "build/index.mdx": __fd_glob_6, "learn/architecture.mdx": __fd_glob_7, "learn/index.mdx": __fd_glob_8, "learn/tokenomics.mdx": __fd_glob_9, "nodes/index.mdx": __fd_glob_10, "reference/index.mdx": __fd_glob_11, }, {"index.mdx": () => import("../content/docs/index.mdx?collection=docs"), "build/index.mdx": () => import("../content/docs/build/index.mdx?collection=docs"), "learn/architecture.mdx": () => import("../content/docs/learn/architecture.mdx?collection=docs"), "learn/index.mdx": () => import("../content/docs/learn/index.mdx?collection=docs"), "learn/tokenomics.mdx": () => import("../content/docs/learn/tokenomics.mdx?collection=docs"), "nodes/index.mdx": () => import("../content/docs/nodes/index.mdx?collection=docs"), "reference/index.mdx": () => import("../content/docs/reference/index.mdx?collection=docs"), });
|
||||
export const docs = await create.docsLazy("docs", "content/docs", {"meta.json": __fd_glob_0, "build/meta.json": __fd_glob_1, "learn/meta.json": __fd_glob_2, "nodes/meta.json": __fd_glob_3, "reference/meta.json": __fd_glob_4, }, {"index.mdx": __fd_glob_5, "build/index.mdx": __fd_glob_6, "learn/architecture.mdx": __fd_glob_7, "learn/index.mdx": __fd_glob_8, "learn/tokenomics.mdx": __fd_glob_9, "reference/index.mdx": __fd_glob_10, "nodes/index.mdx": __fd_glob_11, }, {"index.mdx": () => import("../content/docs/index.mdx?collection=docs"), "build/index.mdx": () => import("../content/docs/build/index.mdx?collection=docs"), "learn/architecture.mdx": () => import("../content/docs/learn/architecture.mdx?collection=docs"), "learn/index.mdx": () => import("../content/docs/learn/index.mdx?collection=docs"), "learn/tokenomics.mdx": () => import("../content/docs/learn/tokenomics.mdx?collection=docs"), "reference/index.mdx": () => import("../content/docs/reference/index.mdx?collection=docs"), "nodes/index.mdx": () => import("../content/docs/nodes/index.mdx?collection=docs"), });
|
||||
@@ -1,19 +1,21 @@
|
||||
name: Build & Deploy
|
||||
name: Deploy to GitHub Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
group: pages
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -28,18 +30,27 @@ jobs:
|
||||
node-version: 22
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v5
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Build
|
||||
run: pnpm build
|
||||
|
||||
- name: Upload build artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
name: docs-build
|
||||
path: .next
|
||||
retention-days: 7
|
||||
path: out
|
||||
|
||||
# Connect this repo to Vercel for automatic deployments
|
||||
# https://vercel.com/new → Import luxfi/docs
|
||||
deploy:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
|
||||
+3
-7
@@ -2,15 +2,11 @@ import { createMDX } from '@hanzo/docs/mdx/next';
|
||||
import type { NextConfig } from 'next';
|
||||
|
||||
const config: NextConfig = {
|
||||
output: 'export',
|
||||
reactStrictMode: true,
|
||||
serverExternalPackages: ['shiki'],
|
||||
async rewrites() {
|
||||
return [
|
||||
{
|
||||
source: '/docs/:path*.mdx',
|
||||
destination: '/llms.mdx/:path*',
|
||||
},
|
||||
];
|
||||
images: {
|
||||
unoptimized: true,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user