Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
init docs site
  • Loading branch information
skarim committed Apr 3, 2026
commit 214b90eff2b08bc372443a98c0496cddb85a46fa
64 changes: 64 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Docs

on:
workflow_dispatch:
pull_request:
paths:
- 'docs/**'
- '.github/workflows/docs.yml'
push:
branches:
- main
- skarim/docs # temporary for testing
paths:
- 'docs/**'
- '.github/workflows/docs.yml'
Comment thread
skarim marked this conversation as resolved.

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

concurrency:
group: "pages-${{ github.ref }}"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
cache: 'npm'
cache-dependency-path: 'docs/package-lock.json'

- name: Install dependencies
working-directory: ./docs
run: npm ci --legacy-peer-deps

- name: Build documentation
working-directory: ./docs
run: npm run build

- name: Upload build artifacts
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/skarim/docs' || github.event_name == 'workflow_dispatch'
uses: actions/upload-pages-artifact@v3
with:
path: ./docs/dist

deploy:
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/skarim/docs' || github.event_name == 'workflow_dispatch'
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
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: release
name: Release

on:
push:
Expand Down
22 changes: 22 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# build output
dist/

# generated types
.astro/

# dependencies
node_modules/

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# environment variables
.env
.env.local
.env.production

# macOS-specific files
.DS_Store
1 change: 1 addition & 0 deletions docs/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps=true
67 changes: 67 additions & 0 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// @ts-check
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';

// https://astro.build/config
export default defineConfig({
site: 'https://github.github.com',
Comment thread
skarim marked this conversation as resolved.
base: '/gh-stack/',
trailingSlash: 'always',
devToolbar: {
enabled: false
},
integrations: [
starlight({
title: 'GitHub Stacked PRs',
description: 'Manage stacked branches and pull requests with the gh stack CLI extension.',
favicon: '/favicon.svg',
customCss: [
'./src/styles/custom.css',
],
social: [
{ icon: 'github', label: 'GitHub', href: 'https://github.com/github/gh-stack' },
],
tableOfContents: {
minHeadingLevel: 2,
maxHeadingLevel: 4
},
pagination: true,
expressiveCode: {
frames: {
showCopyToClipboardButton: true,
},
},
sidebar: [
{
label: 'Introduction',
items: [
{ label: 'Overview', slug: 'introduction/overview' },
],
},
{
label: 'Getting Started',
items: [
{ label: 'Quick Start', slug: 'getting-started/quick-start' },
],
},
{
label: 'Guides',
items: [
{ label: 'Working with Stacked PRs', slug: 'guides/using-prs' },
{ label: 'Typical Workflows', slug: 'guides/workflows' },
],
},
{
label: 'Reference',
items: [
{ label: 'CLI Commands', slug: 'reference/cli' },
],
},
{
label: 'FAQ',
slug: 'faq',
},
],
}),
],
});
Loading