Skip to content

Commit 948bdff

Browse files
committed
ci: generate docs for site and use in build
Signed-off-by: Ruby Iris Juric <[email protected]>
1 parent 146bcc3 commit 948bdff

File tree

1 file changed

+101
-2
lines changed

1 file changed

+101
-2
lines changed

.github/workflows/build.yml

Lines changed: 101 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,116 @@
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:v1
14+
15+
steps:
16+
- name: Checkout pebble-firmware
17+
uses: actions/checkout@v4
18+
with:
19+
# TODO: use pebble-dev when https://github.com/pebble-dev/pebble-firmware/pull/256 merged
20+
repository: Sorixelle/pebble-firmware
21+
ref: fix-sdk-docs-build
22+
submodules: true
23+
24+
- name: Install Python dependencies
25+
run: |
26+
pip install -U pip
27+
pip install -r requirements.txt
28+
29+
- name: Build aplite SDK
30+
run: |
31+
./waf configure --board bb2 --nojs
32+
./waf build --onlysdk
33+
34+
- name: Build basalt SDK
35+
run: |
36+
./waf configure --board snowy_bb2
37+
./waf build --onlysdk
38+
39+
- name: Generate SDK documentation
40+
run: |
41+
./waf docs_sdk
42+
cd build/sdk
43+
zip -r PebbleSDK-4.3_docs.zip {aplite,basalt}/doxygen_sdk
44+
45+
- name: Publish docs artifact
46+
uses: actions/upload-artifact@v4
47+
with:
48+
name: docs-c
49+
path: build/sdk/PebbleSDK-4.3_docs.zip
50+
51+
# TODO: maybe build in pebble-dev/pebble-android-sdk, and publish releases?
52+
gendocs-android:
53+
runs-on: ubuntu-24.04
54+
55+
steps:
56+
- name: Checkout pebble-android-sdk
57+
uses: actions/checkout@v4
58+
with:
59+
# TODO: use pebble-dev when https://github.com/pebble-dev/pebble-android-sdk/pull/1 merged
60+
repository: Sorixelle/pebble-android-sdk
61+
ref: javadocs
62+
63+
- name: Generate documentation
64+
working-directory: PebbleKit
65+
run: |
66+
./gradlew releaseJavadoc
67+
cd PebbleKit/build/docs
68+
zip -r pebblekit_android_4.0.1.zip javadoc
69+
70+
- name: Publish docs artifact
71+
uses: actions/upload-artifact@v4
72+
with:
73+
name: docs-android
74+
path: PebbleKit/PebbleKit/build/docs/pebblekit_android_4.0.1.zip
75+
76+
# TODO: maybe fork into pebble-dev, build there, and publish releases?
77+
gendocs-ios:
78+
runs-on: ubuntu-24.04
79+
80+
steps:
81+
- name: Checkout pebble-ios-sdk
82+
uses: actions/checkout@v4
83+
with:
84+
repository: pebble/pebble-ios-sdk
85+
86+
- name: Generate documentation
87+
working-directory: PebbleKit-iOS.docset/Contents/Resources/Documents
88+
run: |
89+
zip -r pebblekit_ios_4.0.0.zip *
90+
91+
- name: Publish docs artifact
92+
uses: actions/upload-artifact@v4
93+
with:
94+
name: docs-ios
95+
path: PebbleKit-iOS.docset/Contents/Resources/Documents/pebblekit_ios_4.0.0.zip
96+
897
build:
998
runs-on: ubuntu-24.04
99+
needs:
100+
- gendocs-c
101+
- gendocs-android
102+
- gendocs-ios
10103

11104
steps:
12105
- name: Checkout
13106
uses: actions/checkout@v4
14107

108+
- name: Download docs artifacts
109+
uses: actions/download-artifact@v4
110+
with:
111+
pattern: docs-*
112+
path: /tmp/docs
113+
15114
- name: Setup Ruby
16115
uses: ruby/setup-ruby@v1
17116
with:
@@ -20,10 +119,10 @@ jobs:
20119
- name: Build site
21120
run: bundle exec jekyll build
22121
env:
23-
URL: http://developer.rebble.io
122+
URL: https://developer.rebble.io
24123
HTTPS_URL: https://developer.rebble.io
25124
JEKYLL_ENV: production
26-
SKIP_DOCS: true # TODO: setup docs generation
125+
DOCS_URL: /tmp/docs
27126

28127
- name: Upload artifact
29128
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)