Repository navigation
41 lines (35 loc) · 1.43 KB
/
Copy pathdocc.yml
File metadata and controls
41 lines (35 loc) · 1.43 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
name: Documentation
on:
push:
branches: [master]
pull_request:
permissions:
contents: read
jobs:
docbuild:
name: Build DocC documentation
runs-on: macos-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Emit symbol graph
run: |
mkdir -p .build/symbol-graphs
swift build --target SystemSoundsLibrary \
-Xswiftc -emit-symbol-graph \
-Xswiftc -emit-symbol-graph-dir -Xswiftc .build/symbol-graphs
- name: Convert documentation
run: |
xcrun docc convert Sources/SystemSoundsLibrary/SystemSoundsLibrary.docc \
--fallback-display-name SystemSoundsLibrary \
--fallback-bundle-identifier com.github.tuner88.SystemSoundsLibrary \
--additional-symbol-graph-dir .build/symbol-graphs \
--output-path .build/SystemSoundsLibrary.doccarchive \
--warnings-as-errors
- name: Check that symbols were documented
run: |
ls .build/symbol-graphs
data=.build/SystemSoundsLibrary.doccarchive/data/documentation/systemsoundslibrary
for page in systemsound systemsoundplayer filesound gettingstarted soundsorhaptics appreview; do
test -f "$data/$page.json" || { echo "::error::Missing documentation page $page"; exit 1; }
done
echo "Documented pages: $(find "$data" -name '*.json' | wc -l)"