Skip to content

Commit 15a4093

Browse files
CopilotMossaka
andauthored
docs: set up astro starlight documentation infrastructure (#53)
* Initial plan * docs: add astro starlight documentation site Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com> * docs: add astro starlight setup summary Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com> * docs: remove documentation content, keep only astro starlight setup Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com> * fix: pin github actions to sha hashes and fix indentation Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
1 parent 8808d63 commit 15a4093

File tree

13 files changed

+7891
-1
lines changed

13 files changed

+7891
-1
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'docs-site/**'
8+
- '.github/workflows/deploy-docs.yml'
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
concurrency:
17+
group: "pages"
18+
cancel-in-progress: false
19+
20+
jobs:
21+
build:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
26+
27+
- name: Setup Node.js
28+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
29+
with:
30+
node-version: '20'
31+
cache: 'npm'
32+
cache-dependency-path: docs-site/package-lock.json
33+
34+
- name: Install dependencies
35+
run: |
36+
cd docs-site
37+
npm ci
38+
39+
- name: Build documentation
40+
run: |
41+
cd docs-site
42+
npm run build
43+
44+
- name: Upload artifact
45+
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
46+
with:
47+
path: docs-site/dist
48+
49+
deploy:
50+
environment:
51+
name: github-pages
52+
url: ${{ steps.deployment.outputs.page_url }}
53+
runs-on: ubuntu-latest
54+
needs: build
55+
steps:
56+
- name: Deploy to GitHub Pages
57+
id: deployment
58+
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,8 @@ coverage/
1111
*.swo
1212
*~
1313
.idea/
14+
15+
# Documentation site build artifacts
16+
docs-site/dist/
17+
docs-site/.astro/
18+
docs-site/node_modules/

docs-site/README.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Agentic Workflow Firewall Documentation
2+
3+
This directory contains the Astro Starlight documentation site for the Agentic Workflow Firewall.
4+
5+
## Development
6+
7+
### Prerequisites
8+
9+
- Node.js 18+
10+
- npm
11+
12+
### Setup
13+
14+
```bash
15+
# Install dependencies
16+
npm install
17+
18+
# Start development server
19+
npm run dev
20+
```
21+
22+
The site will be available at `http://localhost:4321`
23+
24+
### Build
25+
26+
```bash
27+
# Build for production
28+
npm run build
29+
30+
# Preview production build
31+
npm run preview
32+
```
33+
34+
## Structure
35+
36+
```
37+
docs-site/
38+
├── src/
39+
│ ├── assets/ # Images and static assets
40+
│ ├── content/
41+
│ │ └── docs/ # Documentation content (Markdown/MDX)
42+
│ └── styles/ # Custom CSS
43+
├── public/ # Public static files
44+
├── astro.config.mjs # Astro configuration
45+
└── package.json
46+
```
47+
48+
## Deployment
49+
50+
The documentation is automatically deployed to GitHub Pages when changes are pushed to the `main` branch.
51+
52+
Workflow: `.github/workflows/deploy-docs.yml`
53+
54+
## Links
55+
56+
- [Astro Documentation](https://docs.astro.build/)
57+
- [Starlight Documentation](https://starlight.astro.build/)
58+
- [Live Site](https://githubnext.github.io/gh-aw-firewall/)

docs-site/astro.config.mjs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { defineConfig } from 'astro/config';
2+
import starlight from '@astrojs/starlight';
3+
4+
// https://astro.build/config
5+
export default defineConfig({
6+
site: 'https://githubnext.github.io',
7+
base: '/gh-aw-firewall',
8+
integrations: [
9+
starlight({
10+
title: 'Agentic Workflow Firewall',
11+
description: 'Network firewall for agentic workflows with domain whitelisting',
12+
social: {
13+
github: 'https://github.com/githubnext/gh-aw-firewall',
14+
},
15+
editLink: {
16+
baseUrl: 'https://github.com/githubnext/gh-aw-firewall/edit/main/docs-site/',
17+
},
18+
logo: {
19+
src: './src/assets/logo.svg',
20+
replacesTitle: false,
21+
},
22+
customCss: [
23+
'./src/styles/custom.css',
24+
],
25+
}),
26+
],
27+
});

0 commit comments

Comments
 (0)