Skip to content

Conversation

@scottlovegrove
Copy link
Contributor

@scottlovegrove scottlovegrove commented Nov 8, 2025

Summary

  • Fixes the docs deployment workflow failure by resolving baseUrl is not defined errors
  • Adds a new workflow to validate docs builds on pull requests to prevent future issues

Root Cause

The docs deployment was failing due to JSDoc @deprecated comments containing JavaScript-like syntax with curly braces (e.g., { baseUrl, customFetch }) that were being interpreted as JavaScript expressions in the generated MDX files during static site generation.

Solution

  1. Fix the deployment issue: Added sanitizeComments: true to the TypeDoc plugin configuration to properly escape these expressions in generated documentation
  2. Prevent future issues: Added a new GitHub workflow (validate-docs.yml) that validates documentation builds on pull requests

Testing

  • ✅ Local docs build now succeeds without errors
  • ✅ All existing functionality preserved
  • ✅ New validation workflow will catch similar issues in PRs

Links

🤖 Generated with Claude Code

scottlovegrove and others added 3 commits November 8, 2025 13:53
The docs build was failing due to `baseUrl is not defined` errors during
static site generation. This was caused by JSDoc @deprecated comments
containing JavaScript-like syntax with curly braces (e.g., `{ baseUrl, customFetch }`)
that were being interpreted as JavaScript expressions in the generated MDX files.

Added `sanitizeComments: true` to the TypeDoc plugin configuration to properly
escape these expressions in the generated documentation.

Fixes workflow failure: https://github.com/Doist/todoist-api-typescript/actions/runs/19192983941

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Add a new GitHub workflow that validates documentation builds on pull requests
to catch docs deployment issues before they reach the main branch.

The workflow:
- Triggers on PRs that modify source code, docs, or dependencies
- Builds the documentation using the same steps as deployment
- Validates that the build completes successfully
- Provides clear success/failure feedback

This prevents docs deployment failures like the recent baseUrl issue from
breaking the main branch deployment.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@scottlovegrove scottlovegrove merged commit 4e7646b into main Nov 8, 2025
2 checks passed
@scottlovegrove scottlovegrove deleted the scottl/docs-deployment-fix branch November 8, 2025 14:00
scottlovegrove added a commit to Doist/twist-sdk-typescript that referenced this pull request Nov 8, 2025
…lures

Adds sanitizeComments: true to the TypeDoc plugin configuration to properly escape JavaScript-like syntax in JSDoc comments (e.g., { baseUrl, customFetch }) that could break documentation builds.

This prevents the same issue that occurred in the Todoist SDK where curly braces in @deprecated comments were interpreted as JavaScript expressions in generated MDX files during static site generation.

Refs: Doist/todoist-api-typescript#388
scottlovegrove added a commit to Doist/twist-sdk-typescript that referenced this pull request Nov 8, 2025
Adds a new GitHub workflow that validates documentation builds on pull requests to prevent deployment failures.

The workflow:
- Runs on PRs that modify source code, website files, or dependencies
- Builds the Docusaurus documentation site
- Validates that the build succeeds and generates expected files
- Catches issues like JSDoc comment syntax errors before merge

This prevents the same docs deployment failures that occurred in the Todoist SDK, where invalid JSDoc comments broke the build after merge.

Refs: Doist/todoist-api-typescript#388
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.

2 participants