Skip to content

Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.

fix(docs): deployment paths mismatch (#9067)

Josh Corbett63a1fe5299f7
diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml
index c3c90aa217..2433bc43c4 100644
--- a/.github/workflows/deploy-docs.yml
+++ b/.github/workflows/deploy-docs.yml
@@ -10,6 +10,14 @@ on:
- 'opened'
- 'synchronize'
workflow_dispatch:
+ inputs:
+ deploy_target:
+ description: 'Deploy target (custom = invoke.ai, ghpages = invoke-ai.github.io/InvokeAI)'
+ type: choice
+ options:
+ - custom
+ - ghpages
+ default: custom
permissions:
contents: read
@@ -68,6 +76,8 @@ jobs:
- name: build docs
run: pnpm build
working-directory: docs
+ env:
+ DEPLOY_TARGET: ${{ inputs.deploy_target || 'custom' }}
# Upload artifact for deploy (main branch only)
- name: upload pages artifact
diff --git a/docs/astro.config.mjs b/docs/astro.config.mjs
index 59efd69cd4..0848f39bbe 100644
--- a/docs/astro.config.mjs
+++ b/docs/astro.config.mjs
@@ -8,11 +8,16 @@ import starlightLlmsText from 'starlight-llms-txt';
import starlightChangelogs, { makeChangelogsSidebarLinks } from 'starlight-changelogs';
// import starlightContextualMenu from 'starlight-contextual-menu';
+// Deployment target: 'custom' (default, custom domain at invoke.ai) or 'ghpages'
+// (GitHub Pages project URL at invoke-ai.github.io/InvokeAI). Drive site/base from this
+// so the same source can be deployed to either target.
+const deployTarget = process.env.DEPLOY_TARGET ?? 'custom';
+const isGhPages = deployTarget === 'ghpages';
+
// https://astro.build/config
export default defineConfig({
- site: 'https://invoke.ai',
- // base is only needed if no custom domain is available, or if the site is hosted in a subdirectory
- // base: '/InvokeAI',
+ site: isGhPages ? 'https://invoke-ai.github.io' : 'https://invoke.ai',
+ base: isGhPages ? '/InvokeAI' : undefined,
integrations: [
starlight({
// Content
@@ -24,7 +29,7 @@ export default defineConfig({
alt: 'InvokeAI Logo',
replacesTitle: true,
},
- favicon: './src/assets/invoke-icon.svg',
+ favicon: '/favicon.svg',
editLink: {
baseUrl: 'https://github.com/invoke-ai/InvokeAI/edit/main/docs',
},
@@ -117,10 +122,17 @@ export default defineConfig({
PageFrame: './src/layouts/PageFrameExtended.astro',
},
plugins: [
- starlightLinksValidator({
- errorOnRelativeLinks: false,
- errorOnLocalLinks: false,
- }),
+ // The links validator is skipped for the ghpages target because content uses
+ // root-absolute links (e.g. /concepts/...) that don't include the /InvokeAI base.
+ // Production (custom domain) still enforces link validation.
+ ...(isGhPages
+ ? []
+ : [
+ starlightLinksValidator({
+ errorOnRelativeLinks: false,
+ errorOnLocalLinks: false,
+ }),
+ ]),
starlightLlmsText(),
starlightChangelogs(),
// starlightContextualMenu({
diff --git a/docs/public/CNAME b/docs/public/CNAME
new file mode 100644
index 0000000000..91547b2904
--- /dev/null
+++ b/docs/public/CNAME
@@ -0,0 +1 @@
+invoke.ai
diff --git a/docs/public/favicon.svg b/docs/public/favicon.svg
index cba5ac140a..28d6a6d08e 100644
--- a/docs/public/favicon.svg
+++ b/docs/public/favicon.svg
@@ -1 +1,11 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill-rule="evenodd" d="M81 36 64 0 47 36l-1 2-9-10a6 6 0 0 0-9 9l10 10h-2L0 64l36 17h2L28 91a6 6 0 1 0 9 9l9-10 1 2 17 36 17-36v-2l9 10a6 6 0 1 0 9-9l-9-9 2-1 36-17-36-17-2-1 9-9a6 6 0 1 0-9-9l-9 10v-2Zm-17 2-2 5c-4 8-11 15-19 19l-5 2 5 2c8 4 15 11 19 19l2 5 2-5c4-8 11-15 19-19l5-2-5-2c-8-4-15-11-19-19l-2-5Z" clip-rule="evenodd"/><path d="M118 19a6 6 0 0 0-9-9l-3 3a6 6 0 1 0 9 9l3-3Zm-96 4c-2 2-6 2-9 0l-3-3a6 6 0 1 1 9-9l3 3c3 2 3 6 0 9Zm0 82c-2-2-6-2-9 0l-3 3a6 6 0 1 0 9 9l3-3c3-2 3-6 0-9Zm96 4a6 6 0 0 1-9 9l-3-3a6 6 0 1 1 9-9l3 3Z"/><style>path{fill:#000}@media (prefers-color-scheme:dark){path{fill:#fff}}</style></svg>
\ No newline at end of file
+<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g clip-path="url(#clip0_98_2)">
+<rect width="512" height="512" rx="54" fill="#E6FD13"/>
+<path d="M313.561 165.334H416V96H96V165.334H198.439L313.561 346.666H416V416H96V346.666H198.439" stroke="black" stroke-width="31"/>
+</g>
+<defs>
+<clipPath id="clip0_98_2">
+<rect width="512" height="512" fill="white"/>
+</clipPath>
+</defs>
+</svg>