Skip to content

Commit 8bb34df

Browse files
gouravjshahclaude
andcommitted
ci: Add GitHub Actions workflow for GitHub Pages deployment
- Automatic deployment on push to main branch - Builds Docusaurus site and deploys to GitHub Pages - Supports custom domain openmcp.aof.sh 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 7ad6438 commit 8bb34df

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

.github/workflows/deploy-docs.yml

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

0 commit comments

Comments
 (0)