Skip to content

Conversation

@SoundBlaster
Copy link
Owner

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!

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!
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 44 to 52
# 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"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Avoid iOS device destination requiring code signing

The new doc-build step now runs xcodebuild docbuild with -destination 'generic/platform=iOS'. Building for a physical iOS destination forces code signing, and the NewNav scheme declares DEVELOPMENT_TEAM = P8T2366K8X while the GitHub Actions runner has no certificates for that team. When the workflow executes it will abort with “Signing for 'NewNav' requires a development team” before any DocC archive is produced. Target the iOS simulator or disable signing (CODE_SIGNING_ALLOWED=NO) so the documentation build can succeed in CI.

Useful? React with 👍 / 👎.

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.
@SoundBlaster SoundBlaster merged commit 11798cb into main Nov 11, 2025
4 checks passed
@SoundBlaster SoundBlaster deleted the claude/fix-docc-github-pages-urls-011CV2q14oULMheEHTbHVHsq branch November 11, 2025 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants