-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (46 loc) · 1.77 KB
/
Copy pathdocs.yml
File metadata and controls
58 lines (46 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Deploy Documentation
on:
push:
branches: [main]
workflow_dispatch: {}
permissions:
contents: write
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
lfs: true
- name: Checkout LFS objects
run: git lfs pull
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.9
# Docusaurus CLIs are Node-based; keep Node available
- name: Setup Node
uses: actions/setup-node@v5
with:
node-version: 20
- name: Install dependencies
run: bun install --frozen-lockfile
# Build all packages except docs (needed for API docs generation and example-game)
- name: Build packages
run: bun run build --filter='!@react-text-game/docs'
# Rebuild example-game with correct base path for docs
- name: Build example-game for docs
run: DOCS_BUILD=true bun run build --filter=example-game
# Copy example-game to docs static folder before docs build
- name: Copy example-game to docs static
run: cp -r apps/example-game/dist apps/docs/static/demo
# Build docs site (includes API generation)
- name: Build docs site
run: bun run build --filter=@react-text-game/docs
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: apps/docs/build
publish_branch: docs
cname: reacttextgame.dev