Skip to content

fix(ci): add OpenAPI spec download to GitHub Pages build#494

Merged
tym83 merged 1 commit into
mainfrom
fix/add-openapi-download-to-ci
Apr 16, 2026
Merged

fix(ci): add OpenAPI spec download to GitHub Pages build#494
tym83 merged 1 commit into
mainfrom
fix/add-openapi-download-to-ci

Conversation

@myasnikovdaniil
Copy link
Copy Markdown
Contributor

@myasnikovdaniil myasnikovdaniil commented Apr 16, 2026

Summary

  • The GitHub Pages deploy workflow (hugo.yaml) was missing the ./hack/download_openapi.sh step before hugo --gc --minify
  • This caused the REST API reference page for v1.2 (and any future versions) to have no api.json in production, since v1.2+ rely on build-time download rather than a committed file
  • Netlify deploy previews were unaffected — netlify.toml already includes this step

Test plan

  • Verify Netlify deploy preview shows the v1.2 REST API page at /docs/v1.2/cozystack-api/rest/
  • After merge, verify production GitHub Pages serves /docs/v1.2/cozystack-api/api.json

Summary by CodeRabbit

  • Chores
    • Enhanced the build pipeline to automatically retrieve and include the latest API specifications during documentation generation, ensuring generated documentation reflects current technical standards.

The GitHub Pages workflow was missing the download_openapi.sh step that
fetches OpenAPI specs for docs versions that don't ship api.json in git
(v1.1+). This caused the REST API reference page for v1.2 to be empty
in production. Netlify deploy previews were unaffected as netlify.toml
already includes this step.

Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 16, 2026

Deploy Preview for cozystack ready!

Name Link
🔨 Latest commit 1bb42db
🔍 Latest deploy log https://app.netlify.com/projects/cozystack/deploys/69e0a612b818aa00086fe6dd
😎 Deploy Preview https://deploy-preview-494--cozystack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 16, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4ba79aef-68e1-4802-b13d-7f2a55ff5ed3

📥 Commits

Reviewing files that changed from the base of the PR and between cbea500 and 1bb42db.

📒 Files selected for processing (1)
  • .github/workflows/hugo.yaml

📝 Walkthrough

Walkthrough

A new build step is added to the Hugo GitHub Actions workflow that downloads OpenAPI specifications before the Hugo build, authenticated via GitHub token environment variable.

Changes

Cohort / File(s) Summary
Workflow Configuration
.github/workflows/hugo.yaml
Added a new build step that executes ./hack/download_openapi.sh to fetch OpenAPI specifications, supplied with GITHUB_TOKEN via secrets, positioned before the Hugo build step.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A rabbit hops through workflows grand,
OpenAPI specs now at hand!
Before Hugo builds with might and care,
Tokens and secrets dance in the air. ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding OpenAPI spec download to the GitHub Pages build workflow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/add-openapi-download-to-ci

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@tym83 tym83 merged commit 72c3aa9 into main Apr 16, 2026
6 checks passed
@tym83 tym83 deleted the fix/add-openapi-download-to-ci branch April 16, 2026 09:24
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