21
21
with :
22
22
fetch-depth : 0
23
23
24
- - name : Checkout swift-docc
25
- uses : actions/checkout@v2
26
- with :
27
- repository : apple/swift-docc
28
- ref : main
29
- path : swift-docc
30
-
31
- - name : Cache DocC
32
- id : cache-docc
33
- uses : actions/cache@v2
34
- with :
35
- key : swift-url-docc-build
36
- path : swift-docc/.build
37
-
38
- - name : Build swift-docc
39
- if : ${{ !steps.cache-docc.outputs.cache-hit }}
40
- run : |
41
- cd swift-docc; swift build --product docc -c release; cd ..
42
-
43
- - name : Checkout swift-docc-render
44
- uses : actions/checkout@v2
45
- with :
46
- repository : apple/swift-docc-render
47
- ref : main
48
- path : swift-docc-render
49
-
50
- - name : Build swift-docc-render
51
- run : |
52
- cd swift-docc-render; npm install && npm run build; cd ..
53
-
54
24
- name : Checkout gh-pages Branch
55
25
uses : actions/checkout@v2
56
26
with :
@@ -65,41 +35,25 @@ jobs:
65
35
66
36
for tag in $(echo "main"; git tag -l --sort=-v:refname | grep -e "\d\+\.\d\+.0" | head -6);
67
37
do
68
- if [ -d "docs-out/$tag" ]
38
+ if [ -d "docs-out/$tag/data/documentation/composablearchitecture " ]
69
39
then
70
40
echo "✅ Documentation for "$tag" already exists.";
71
41
else
72
- echo "⏳ Generating documentation for "$target" @ "$tag" release.";
42
+ echo "⏳ Generating documentation for ComposableArchitecture @ "$tag" release.";
43
+ rm -rf "docs-out/$tag";
73
44
74
- for target in ComposableArchitecture Dependencies;
75
- do
76
45
git checkout .;
77
46
git checkout "$tag";
78
- mkdir -p Sources/"$target"/Documentation.docc;
79
- export DOCC_HTML_DIR="$(pwd)/swift-docc-render/dist";
80
47
81
- rm -rf .build/symbol-graphs;
82
- mkdir -p .build/symbol-graphs;
83
- swift build \
84
- --target "$target" \
85
- -Xswiftc \
86
- -emit-symbol-graph \
87
- -Xswiftc \
88
- -emit-symbol-graph-dir \
89
- -Xswiftc \
90
- .build/symbol-graphs \
91
- && swift-docc/.build/release/docc convert Sources/"$target"/Documentation.docc \
92
- --fallback-display-name "$target" \
93
- --fallback-bundle-identifier co.pointfree.ComposableArchitecture \
94
- --fallback-bundle-version 0.0.0 \
95
- --additional-symbol-graph-dir \
96
- .build/symbol-graphs \
48
+ swift package \
49
+ --allow-writing-to-directory docs-out/"$tag" \
50
+ generate-documentation \
51
+ --target ComposableArchitecture \
52
+ --output-path docs-out/"$tag" \
97
53
--transform-for-static-hosting \
98
54
--hosting-base-path /reactiveswift-composable-architecture/"$tag" \
99
- --output-path docs-out/"$tag" \
100
- && echo "✅ Documentation generated for "$target" @ "$tag" release." \
101
- || echo "⚠️ Documentation skipped for "$target" @ "$tag".";
102
- done;
55
+ && echo "✅ Documentation generated for ComposableArchitecture @ "$tag" release." \
56
+ || echo "⚠️ Documentation skipped for ComposableArchitecture @ "$tag".";
103
57
fi;
104
58
done
105
59
0 commit comments