From 3bed5b790ee0b5c51d3bb3cc6a4332660fd7848e Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 11 Nov 2025 23:27:28 +0000 Subject: [PATCH 1/2] Use xcodebuild docbuild to generate full documentation Root cause identified: Using 'docc convert' on standalone Documentation.docc catalog only generates tutorials, not API documentation. When Xcode does Documentation Build locally: - Builds Swift code - Extracts API from code - Creates /documentation/newnav/ with API docs - Adds /tutorials/ from Documentation.docc But our workflow was doing: - xcrun docc convert Documentation.docc (no Swift code build) - Only generates /tutorials/ - Missing /documentation/ directory Solution: Use xcodebuild docbuild - Builds the entire project - Generates both API docs and tutorials - Creates proper /documentation/newnav/ directory - Pass DOCC_HOSTING_BASE_PATH to xcodebuild This should now generate the same structure as local Xcode build, with both /documentation/newnav/ (API) and /tutorials/ (tutorials). The redirect issue was a red herring - the real problem was that we weren't building the Swift code at all, so DocC had no API to document! --- .github/workflows/docc.yml | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docc.yml b/.github/workflows/docc.yml index 5c1a6c6..e55dbbc 100644 --- a/.github/workflows/docc.yml +++ b/.github/workflows/docc.yml @@ -39,14 +39,25 @@ jobs: run: | set -eo pipefail # Clean up any previous build artifacts - rm -rf DocsArchive DocsBuild + rm -rf DerivedData DocsArchive DocsBuild + + # Use xcodebuild docbuild to build full documentation including API + # This will create both /documentation/ (API) and /tutorials/ sections + # DOCC_HOSTING_BASE_PATH is set in Xcode project, but we can override via environment + xcodebuild docbuild \ + -project XcodeProject/NewNav.xcodeproj \ + -scheme NewNav \ + -derivedDataPath ./DerivedData \ + -destination 'generic/platform=iOS' \ + DOCC_HOSTING_BASE_PATH="$DOCC_HOSTING_BASE_PATH" + + # Find the generated .doccarchive + DOCCARCHIVE=$(find DerivedData -name "*.doccarchive" | head -1) + echo "Found doccarchive at: $DOCCARCHIVE" + + # Copy to expected location mkdir -p DocsArchive - xcrun docc convert XcodeProject/NewNav/Documentation.docc \ - --fallback-display-name "NavigationSplitView" \ - --fallback-bundle-identifier com.example.NavigationSplitView \ - --fallback-bundle-version 1.0 \ - --emit-lmdb-index \ - --output-path DocsArchive/NavigationSplitView.doccarchive + cp -R "$DOCCARCHIVE" DocsArchive/NavigationSplitView.doccarchive - name: Prepare static documentation output run: | From 7947d3f3a685a6c72fd1ca2ee499788cbdfee833 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 11 Nov 2025 23:33:07 +0000 Subject: [PATCH 2/2] Disable code signing for docbuild on CI xcodebuild docbuild was failing with: No profiles for 'ru.egormerkushev.newnav.NewNav' were found Documentation builds don't need code signing, so disable it: - CODE_SIGN_IDENTITY="" - CODE_SIGNING_REQUIRED=NO - CODE_SIGNING_ALLOWED=NO - Use iOS Simulator destination (doesn't require signing) This matches the pattern used in build.yml for verification builds. --- .github/workflows/docc.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docc.yml b/.github/workflows/docc.yml index e55dbbc..08aacba 100644 --- a/.github/workflows/docc.yml +++ b/.github/workflows/docc.yml @@ -48,7 +48,10 @@ jobs: -project XcodeProject/NewNav.xcodeproj \ -scheme NewNav \ -derivedDataPath ./DerivedData \ - -destination 'generic/platform=iOS' \ + -destination 'generic/platform=iOS Simulator' \ + CODE_SIGN_IDENTITY="" \ + CODE_SIGNING_REQUIRED=NO \ + CODE_SIGNING_ALLOWED=NO \ DOCC_HOSTING_BASE_PATH="$DOCC_HOSTING_BASE_PATH" # Find the generated .doccarchive