forked from Echo-Mirror-Butler/echomirror-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (67 loc) · 2.18 KB
/
Copy pathdocs.yml
File metadata and controls
81 lines (67 loc) · 2.18 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Docs
on:
pull_request:
paths:
- 'packages/js/**'
- 'crates/**'
- 'packages/flutter/**'
- 'docs-site/**'
- '.github/workflows/docs.yml'
push:
branches: [main]
paths:
- 'packages/js/**'
- 'crates/**'
- 'packages/flutter/**'
- 'docs-site/**'
- '.github/workflows/docs.yml'
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
# JS/TS API reference (typedoc)
- name: Install workspace dependencies
run: npm install
- name: Build JS packages
run: |
npm run build --workspace=@echomirror/core
npm run build --workspace=@echomirror/mood
npm run build --workspace=@echomirror/react
npm run build --workspace=@echomirror/stellar
# Rust API reference (cargo doc)
- name: Generate Rust docs
run: cargo doc --workspace --no-deps
# Dart API reference (dartdoc)
- name: Install Flutter package dependencies
working-directory: packages/flutter
run: flutter pub get
- name: Generate Dart docs
working-directory: packages/flutter
run: dart doc .
# Wire generated docs into the Docusaurus static folder
- name: Copy Rust docs into docs site
run: |
mkdir -p docs-site/static/api
cp -r target/doc docs-site/static/api/rust
- name: Copy Dart docs into docs site
run: cp -r packages/flutter/doc/api docs-site/static/api/dart
# Build the docs site — fails on typedoc errors, undocumented public
# APIs surfaced as typedoc warnings-as-errors, or broken internal links
# (onBrokenLinks: 'throw' in docusaurus.config.ts)
- name: Install docs site dependencies
working-directory: docs-site
run: npm install
- name: Build docs site
working-directory: docs-site
run: npm run build