11name : Build static site
22
33on :
4+ workflow_dispatch :
45 push :
56 branches : [main]
67
78jobs :
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+ # TODO: use ghcr.io/pebble-dev/pebbleos-docker when https://github.com/pebble-dev/pebbleos-docker/pull/1 merged
14+ image : ghcr.io/sorixelle/pebbleos-docker:doxygen
15+
16+ steps :
17+ - name : Checkout pebble-firmware
18+ uses : actions/checkout@v4
19+ with :
20+ # TODO: use pebble-dev when https://github.com/pebble-dev/pebble-firmware/pull/256 merged
21+ repository : Sorixelle/pebble-firmware
22+ ref : fix-sdk-docs-build
23+ submodules : true
24+
25+ - name : Install Python dependencies
26+ run : |
27+ pip install -U pip
28+ pip install -r requirements.txt
29+
30+ - name : Build aplite SDK
31+ run : |
32+ ./waf configure --board bb2 --nojs
33+ ./waf build --onlysdk
34+
35+ - name : Build basalt SDK
36+ run : |
37+ ./waf configure --board snowy_bb2
38+ ./waf build --onlysdk
39+
40+ - name : Generate SDK documentation
41+ run : |
42+ ./waf docs_sdk
43+
44+ - name : Publish docs artifact
45+ uses : actions/upload-artifact@v4
46+ with :
47+ name : docs-c
48+ path : |
49+ build/sdk/aplite/doxygen_sdk
50+ build/sdk/basalt/doxygen_sdk
51+
52+ # TODO: maybe build in pebble-dev/pebble-android-sdk, and publish releases?
53+ gendocs-android :
54+ runs-on : ubuntu-24.04
55+
56+ steps :
57+ - name : Checkout pebble-android-sdk
58+ uses : actions/checkout@v4
59+ with :
60+ # TODO: use pebble-dev when https://github.com/pebble-dev/pebble-android-sdk/pull/1 merged
61+ repository : Sorixelle/pebble-android-sdk
62+ ref : javadocs
63+
64+ - name : Generate documentation
65+ working-directory : PebbleKit
66+ run : |
67+ ./gradlew releaseJavadoc
68+
69+ - name : Publish docs artifact
70+ uses : actions/upload-artifact@v4
71+ with :
72+ name : docs-android
73+ path : PebbleKit/PebbleKit/build/docs/javadoc
74+
75+ # TODO: maybe fork into pebble-dev, build there, and publish releases?
76+ gendocs-ios :
77+ runs-on : ubuntu-24.04
78+
79+ steps :
80+ - name : Checkout pebble-ios-sdk
81+ uses : actions/checkout@v4
82+ with :
83+ repository : pebble/pebble-ios-sdk
84+
85+ - name : Publish docs artifact
86+ uses : actions/upload-artifact@v4
87+ with :
88+ name : docs-ios
89+ path : PebbleKit-iOS.docset/Contents/Resources/Documents
90+
891 build :
992 runs-on : ubuntu-24.04
93+ needs :
94+ - gendocs-c
95+ - gendocs-android
96+ - gendocs-ios
1097
1198 steps :
1299 - name : Checkout
13100 uses : actions/checkout@v4
14101
102+ - name : Download docs artifacts
103+ uses : actions/download-artifact@v4
104+ with :
105+ pattern : docs-*
106+ path : /tmp/docs
107+
108+ - name : Create docs archives
109+ working-directory : /tmp/docs
110+ run : |
111+ cd docs-c
112+ zip -r ../PebbleSDK-4.3_docs.zip {aplite,basalt}/doxygen_sdk
113+ cd ..
114+
115+ mv docs-android javadoc
116+ zip -r pebblekit_android_4.0.1.zip javadoc
117+
118+ cd docs-ios
119+ zip -r ../pebblekit_ios_4.0.0.zip *
120+
15121 - name : Setup Ruby
16122 uses : ruby/setup-ruby@v1
17123 with :
@@ -20,10 +126,10 @@ jobs:
20126 - name : Build site
21127 run : bundle exec jekyll build
22128 env :
23- URL : http ://developer.rebble.io
129+ URL : https ://developer.rebble.io
24130 HTTPS_URL : https://developer.rebble.io
25131 JEKYLL_ENV : production
26- SKIP_DOCS : true # TODO: setup docs generation
132+ DOCS_URL : /tmp/ docs/
27133
28134 - name : Upload artifact
29135 uses : actions/upload-artifact@v4
0 commit comments