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.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Deploy documentation

on:
push:
branches: [main]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out documentation
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm

- name: Install documentation dependencies
run: npm ci

- name: Build and test static documentation
run: npm test

- name: Configure GitHub Pages
uses: actions/configure-pages@v5

- name: Upload static site
uses: actions/upload-pages-artifact@v4
with:
path: dist/client

deploy:
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
5 changes: 0 additions & 5 deletions .openai/hosting.json

This file was deleted.

9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ application remains a separate deployment at `https://app.tasknotes.dev`.

## Publication

This repository owns the `tasknotes.dev` publication workflow. The product
repositories retain their release notes, generated references, and internal
documentation, but do not deploy the public documentation site.
Pushes to `main` build, test, and deploy the static site to GitHub Pages through
`.github/workflows/deploy.yml`. GitHub Pages serves that deployment at
`tasknotes.dev`.

The product repositories retain their release notes, generated references, and
internal documentation, but do not deploy the public documentation site.
11 changes: 11 additions & 0 deletions app/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ interface RouteProps {
params: Promise<{ slug?: string[] }>;
}

export function generateStaticParams(): Array<{ slug: string[] }> {
const routes = new Set([
...documentation.pages.map((page) => page.route),
...Object.keys(documentation.redirects),
]);

return [...routes].map((route) => ({
slug: route.split("/").filter(Boolean),
}));
}

export async function generateMetadata({ params }: RouteProps): Promise<Metadata> {
const route = normalizeRoute((await params).slug);
const destination = documentation.redirects[route];
Expand Down
45 changes: 0 additions & 45 deletions build/sites-vite-plugin.ts

This file was deleted.

1 change: 1 addition & 0 deletions next.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { NextConfig } from "next";

const nextConfig: NextConfig = {
output: "export",
trailingSlash: true,
};

Expand Down
Loading
Loading