Skip to content

Commit 3d4f6c8

Browse files
initcronclaude
andcommitted
ci: add GitHub Actions workflow to deploy Docusaurus to GitHub Pages
Triggers on push to main (course-content/** changes) or manual dispatch. Build: Node 20, npm ci, docusaurus build. Deploy: actions/deploy-pages with pages environment. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent b5efaed commit 3d4f6c8

1 file changed

Lines changed: 55 additions & 0 deletions

File tree

.github/workflows/deploy-docs.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Deploy Docusaurus to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'course-content/**'
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+
defaults:
24+
run:
25+
working-directory: course-content
26+
steps:
27+
- uses: actions/checkout@v4
28+
29+
- uses: actions/setup-node@v4
30+
with:
31+
node-version: '20'
32+
cache: npm
33+
cache-dependency-path: course-content/package-lock.json
34+
35+
- name: Install dependencies
36+
run: npm ci
37+
38+
- name: Build
39+
run: npm run build
40+
41+
- uses: actions/configure-pages@v5
42+
43+
- uses: actions/upload-pages-artifact@v3
44+
with:
45+
path: course-content/build
46+
47+
deploy:
48+
needs: build
49+
runs-on: ubuntu-latest
50+
environment:
51+
name: github-pages
52+
url: ${{ steps.deployment.outputs.page_url }}
53+
steps:
54+
- id: deployment
55+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)