Skip to content

Commit 188f313

Browse files
committed
ci: generate docs for site and use in build
Signed-off-by: Ruby Iris Juric <ruby@srxl.me>
1 parent b13c23d commit 188f313

File tree

1 file changed

+104
-2
lines changed

1 file changed

+104
-2
lines changed

.github/workflows/build.yml

Lines changed: 104 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,119 @@
11
name: Build static site
22

33
on:
4+
workflow_dispatch:
45
push:
56
branches: [main]
67

78
jobs:
9+
# TODO: build these docs in pebble-dev/pebble-firmware, and publish in releases
10+
gendocs-c:
11+
runs-on: ubuntu-24.04
12+
container:
13+
image: ghcr.io/pebble-dev/pebbleos-docker:main
14+
15+
steps:
16+
- name: Checkout pebble-firmware
17+
uses: actions/checkout@v4
18+
with:
19+
repository: pebble-dev/pebble-firmware
20+
ref: main
21+
submodules: true
22+
23+
- name: Install Python dependencies
24+
run: |
25+
pip install -U pip
26+
pip install -r requirements.txt
27+
28+
- name: Build aplite SDK
29+
run: |
30+
./waf configure --board bb2 --nojs
31+
./waf build --onlysdk
32+
33+
- name: Build basalt SDK
34+
run: |
35+
./waf configure --board snowy_bb2
36+
./waf build --onlysdk
37+
38+
- name: Generate SDK documentation
39+
run: |
40+
./waf docs_sdk
41+
42+
- name: Publish docs artifact
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: docs-c
46+
path: |
47+
build/sdk/aplite/doxygen_sdk
48+
build/sdk/basalt/doxygen_sdk
49+
50+
# TODO: maybe build in pebble-dev/pebble-android-sdk, and publish releases?
51+
gendocs-android:
52+
runs-on: ubuntu-24.04
53+
54+
steps:
55+
- name: Checkout pebble-android-sdk
56+
uses: actions/checkout@v4
57+
with:
58+
repository: pebble-dev/pebble-android-sdk
59+
60+
- name: Generate documentation
61+
working-directory: PebbleKit
62+
run: |
63+
./gradlew releaseJavadoc
64+
65+
- name: Publish docs artifact
66+
uses: actions/upload-artifact@v4
67+
with:
68+
name: docs-android
69+
path: PebbleKit/PebbleKit/build/docs/javadoc
70+
71+
# TODO: maybe fork into pebble-dev, build there, and publish releases?
72+
gendocs-ios:
73+
runs-on: ubuntu-24.04
74+
75+
steps:
76+
- name: Checkout pebble-ios-sdk
77+
uses: actions/checkout@v4
78+
with:
79+
repository: pebble/pebble-ios-sdk
80+
81+
- name: Publish docs artifact
82+
uses: actions/upload-artifact@v4
83+
with:
84+
name: docs-ios
85+
path: PebbleKit-iOS.docset/Contents/Resources/Documents
86+
887
build:
988
runs-on: ubuntu-24.04
89+
needs:
90+
- gendocs-c
91+
- gendocs-android
92+
- gendocs-ios
1093

1194
steps:
1295
- name: Checkout
1396
uses: actions/checkout@v4
1497

98+
- name: Download docs artifacts
99+
uses: actions/download-artifact@v4
100+
with:
101+
pattern: docs-*
102+
path: /tmp/docs
103+
104+
- name: Create docs archives
105+
working-directory: /tmp/docs
106+
run: |
107+
cd docs-c
108+
zip -r ../PebbleSDK-4.3_docs.zip {aplite,basalt}/doxygen_sdk
109+
cd ..
110+
111+
mv docs-android javadoc
112+
zip -r pebblekit_android_4.0.1.zip javadoc
113+
114+
cd docs-ios
115+
zip -r ../pebblekit_ios_4.0.0.zip *
116+
15117
- name: Setup Ruby
16118
uses: ruby/setup-ruby@v1
17119
with:
@@ -20,10 +122,10 @@ jobs:
20122
- name: Build site
21123
run: bundle exec jekyll build
22124
env:
23-
URL: http://developer.rebble.io
125+
URL: https://developer.rebble.io
24126
HTTPS_URL: https://developer.rebble.io
25127
JEKYLL_ENV: production
26-
SKIP_DOCS: true # TODO: setup docs generation
128+
DOCS_URL: /tmp/docs/
27129

28130
- name: Upload artifact
29131
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)