Skip to content

Commit 882c277

Browse files
committed
🚀 Add GitHub Pages deployment workflow for docs
Set up automated VitePress documentation deployment with GitHub Actions. The workflow builds and deploys docs on pushes to main when docs/ changes. Configures base path for GitHub Pages project site hosting.
1 parent a6ecb66 commit 882c277

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed

.github/workflows/docs.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Deploy Docs
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'docs/**'
8+
- '.github/workflows/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@v4
26+
with:
27+
fetch-depth: 0
28+
29+
- name: Setup Node
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version: 20
33+
34+
- name: Setup pnpm
35+
uses: pnpm/action-setup@v3
36+
with:
37+
version: 9
38+
39+
- name: Install dependencies
40+
working-directory: docs
41+
run: pnpm install
42+
43+
- name: Build docs
44+
working-directory: docs
45+
run: pnpm build
46+
47+
- name: Setup Pages
48+
uses: actions/configure-pages@v4
49+
50+
- name: Upload artifact
51+
uses: actions/upload-pages-artifact@v3
52+
with:
53+
path: docs/.vitepress/dist
54+
55+
deploy:
56+
environment:
57+
name: github-pages
58+
url: ${{ steps.deployment.outputs.page_url }}
59+
needs: build
60+
runs-on: ubuntu-latest
61+
steps:
62+
- name: Deploy to GitHub Pages
63+
id: deployment
64+
uses: actions/deploy-pages@v4

docs/.vitepress/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { defineConfig } from 'vitepress'
33
export default defineConfig({
44
title: 'Git-Iris',
55
description: 'AI-powered Git workflows, beautifully crafted',
6+
base: '/git-iris/',
67

78
head: [
89
['link', { rel: 'icon', type: 'image/svg+xml', href: '/logo.svg' }],

0 commit comments

Comments
 (0)