Skip to content

Commit 60cbc06

Browse files
committed
Add GitHub Actions workflow for docs deployment to GitHub Pages
1 parent f272483 commit 60cbc06

2 files changed

Lines changed: 64 additions & 66 deletions

File tree

.github/workflows/deploy-docs.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Deploy Docs to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Trigger on push to main branch
7+
paths:
8+
- 'docs-site/**' # Only when docs-site changes
9+
- '.github/workflows/deploy-docs.yml'
10+
workflow_dispatch: # Allow manual trigger
11+
12+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
# Allow only one concurrent deployment
19+
concurrency:
20+
group: "pages"
21+
cancel-in-progress: false
22+
23+
jobs:
24+
build:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
30+
- name: Setup Node.js
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: '18'
34+
cache: 'npm'
35+
cache-dependency-path: docs-site/package-lock.json
36+
37+
- name: Install dependencies
38+
working-directory: ./docs-site
39+
run: npm ci
40+
41+
- name: Build docs
42+
working-directory: ./docs-site
43+
env:
44+
GITHUB_PAGES: 'true'
45+
run: npm run 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-site/dist'
54+
55+
deploy:
56+
environment:
57+
name: github-pages
58+
url: ${{ steps.deployment.outputs.page_url }}
59+
runs-on: ubuntu-latest
60+
needs: build
61+
steps:
62+
- name: Deploy to GitHub Pages
63+
id: deployment
64+
uses: actions/deploy-pages@v4

.github/workflows/test.yml

Lines changed: 0 additions & 66 deletions
This file was deleted.

0 commit comments

Comments
 (0)