Skip to content

Commit 99a5751

Browse files
committed
chore: Add GitHub Pages workflow for documentation deployment
1 parent a2de91b commit 99a5751

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

.github/workflows/pages.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Deploy Docs to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Trigger on pushes to the main branch
7+
8+
jobs:
9+
build-and-deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v3
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: '20' # Use a stable Node.js version
20+
21+
- name: Install dependencies
22+
run: npm install
23+
24+
- name: Build Documentation
25+
run: |
26+
# Assuming your documentation is in the 'docs' directory
27+
# and you want to use a static site generator or just copy files.
28+
# For simple markdown files, you might just copy them.
29+
# For more complex docs, you might use a tool like VitePress, Docusaurus, etc.
30+
# Since we just have markdown files, we'll just ensure they are in a deployable state.
31+
echo "Building documentation..."
32+
# No specific build step for raw markdown, just ensure 'docs' exists.
33+
34+
- name: Deploy to GitHub Pages
35+
uses: peaceiris/actions-gh-pages@v3
36+
with:
37+
github_token: ${{ secrets.GITHUB_TOKEN }}
38+
publish_dir: ./docs # The directory containing your built documentation
39+
# If you have a custom domain, uncomment and set:
40+
# cname: example.com

0 commit comments

Comments
 (0)