Host and Automate your DocC documentation ☁️
Tl;dr
I tweaked the xcodebuild docbuild
for modular projects as below:
xcodebuild -project ModularSlothCreator.xcodeproj -derivedDataPath docsData -scheme ModularSlothCreator -destination 'platform=iOS Simulator,name=iPhone 13 Pro Max' -parallelizeTargets docbuild
I also tweaked the docc
site generation using the transform-for-static-hosting
flag:
$(xcrun --find docc) process-archive transform-for-static-hosting "$ARCHIVE" --hosting-base-path ModularSlothCreator/$ARCHIVE_NAME --output-path docs/$ARCHIVE_NAME
BONUS: Automate DocC with GitHub Pages and CI
I've updated the original demo showcased at WWDC with support for static hosting of modular App targets (rather than only supporting a single Swift Package announced at WWDC) using GitHub Pages without needing to define a server configuration for convenience in my blog post.