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
53 changes: 53 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Deploy docs

on:
push:
branches: [main]
paths:
- 'docs/**'
- '.github/workflows/deploy-docs.yml'
workflow_dispatch:

# Allow the workflow to publish to GitHub Pages.
permissions:
contents: read
pages: write
id-token: write

# One in-flight deploy at a time; let a newer push supersede an older one
# (but don't cancel a run mid-publish).
concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: Build docs
env:
# Project-pages base path (gemstack-land.github.io/gemstack/).
# Remove this once a custom domain serves the site at the root.
DOCS_BASE: /gemstack/
run: pnpm --filter @gemstack/docs docs:build
- uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v3
with:
path: docs/.vitepress/dist

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4
5 changes: 5 additions & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ export default defineConfig({
title: 'GemStack',
description: 'Framework-agnostic tools for building AI applications in Node.',
lang: 'en-US',
// Served at the site root by default (local dev, and a custom domain like
// gemstack.land). The GitHub Pages workflow sets DOCS_BASE=/gemstack/ for the
// project-pages URL (gemstack-land.github.io/gemstack/). Drop that env once a
// custom domain is attached so the base returns to '/'.
base: process.env.DOCS_BASE || '/',
ignoreDeadLinks: 'localhostLinks',

head: [
Expand Down
Loading