Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 2 additions & 28 deletions .github/workflows/deploy-docs-and-extensions.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy Docs & Extensions # (/documentation and /extensions-site)
name: Deploy Documentation

on:
push:
Expand All @@ -8,7 +8,6 @@ on:
pull_request:
paths:
- 'documentation/**'
- 'extensions-site/**'

jobs:
deploy:
Expand Down Expand Up @@ -43,34 +42,9 @@ jobs:
npm install
npm run build

- name: Cache Node.js modules (extensions-site)
uses: actions/cache@v3
with:
path: ./extensions-site/node_modules
key: ${{ runner.os }}-extensions-${{ hashFiles('./extensions-site/package-lock.json') }}
restore-keys: |
${{ runner.os }}-extensions-

- name: Install dependencies and build extensions-site
working-directory: ./extensions-site
env:
VITE_BASENAME: "/goose/v1/extensions/" # Set the base URL here for the extensions site
run: |
npm install
npm run build

- name: Combine builds into one directory
run: |
mkdir combined-build
cp -r documentation/build/* combined-build/
mkdir -p combined-build/v1/extensions
mkdir -p combined-build/v1/extensions/install-link-generator
cp -r extensions-site/build/client/* combined-build/v1/extensions/
cp -r extensions-site/install-link-generator/* combined-build/v1/extensions/install-link-generator/

- name: Deploy to /gh-pages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: combined-build
publish_dir: documentation/build
21 changes: 2 additions & 19 deletions .github/workflows/pr-website-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
- closed
paths:
- 'documentation/**'
- 'extensions-site/**'

concurrency: preview-${{ github.ref }}

Expand All @@ -21,8 +20,8 @@ jobs:
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
if: github.event.action != 'closed'
uses: actions/setup-node@v3
with:
node-version: 20

Expand All @@ -38,24 +37,8 @@ jobs:
npm install
npm run build

- name: Install dependencies and build extensions-site
working-directory: ./extensions-site
env:
VITE_BASENAME: "/goose/pr-preview/pr-${{ github.event.number }}/v1/extensions/" # Set the base URL here for the extensions site
run: |
npm install
npm run build

- name: Combine builds into one directory
if: github.event.action != 'closed'
run: |
mkdir combined-build
cp -r documentation/build/* combined-build/
mkdir -p combined-build/v1/extensions
cp -r extensions-site/build/client/* combined-build/v1/extensions/

- name: Deploy preview
uses: rossjrw/pr-preview-action@v1
if: ${{ github.event.pull_request.head.repo.full_name == 'block/goose' }}
with:
source-dir: combined-build
source-dir: documentation/build
2 changes: 1 addition & 1 deletion documentation/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Dependencies
/node_modules
/node_modules/

# Production
/build
Expand Down
21 changes: 16 additions & 5 deletions documentation/docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { themes as prismThemes } from "prism-react-renderer";
import type { Config } from "@docusaurus/types";
import type * as Preset from "@docusaurus/preset-classic";
import tailwindPlugin from "./plugins/tailwind-config.cjs";

// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)

Expand Down Expand Up @@ -58,7 +59,11 @@ const config: Config = {
blogSidebarCount: 'ALL'
},
theme: {
customCss: "./src/css/custom.css",
customCss: [
"./src/css/custom.css",
"./src/css/extensions.css",
"./src/css/tailwind.css",
],
},
} satisfies Preset.Options,
],
Expand Down Expand Up @@ -95,10 +100,15 @@ const config: Config = {
{
from: '/docs',
to: '/docs/category/getting-started'
},
{
from: '/v1/extensions',
to: '/extensions'
}
]
],
},
],
tailwindPlugin,
],
themes: ["@inkeep/docusaurus/chatButton", "@inkeep/docusaurus/searchBar"],
themeConfig: {
Expand All @@ -118,7 +128,7 @@ const config: Config = {
position: "left",
},
{
to: "https://block.github.io/goose/v1/extensions/",
to: "/extensions",
label: "Extensions",
position: "left",
},
Expand All @@ -127,6 +137,7 @@ const config: Config = {
position: "left",
label: "Docs",
},

{
to: "/docs/category/tutorials",
position: "left",
Expand Down Expand Up @@ -157,7 +168,7 @@ const config: Config = {
},
{
label: "Extensions",
to: "https://block.github.io/goose/v1/extensions/",
to: "/extensions",
},
],
},
Expand Down Expand Up @@ -236,4 +247,4 @@ const config: Config = {
} satisfies Preset.ThemeConfig,
};

export default config;
export default config;
Loading
Loading