Skip to content

docs: remove generated API reference files from git tracking#5156

Merged
timdeschryver merged 5 commits into
mainfrom
timdeschryver/docs-automate-api-docs-generation
May 20, 2026
Merged

docs: remove generated API reference files from git tracking#5156
timdeschryver merged 5 commits into
mainfrom
timdeschryver/docs-automate-api-docs-generation

Conversation

@timdeschryver
Copy link
Copy Markdown
Member

@timdeschryver timdeschryver commented May 18, 2026

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[x] CI related changes
[x] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

The 334 generated API reference JSON files under projects/www/src/app/reference/ are committed to the repository. This means they can go stale whenever the API surface changes, requiring a manual run of collect-docs to update them.

Fixes: #5154

What is the new behavior?

The generated files are untracked. The .gitignore entry for them already existed; this PR removes the previously committed copies.

The collect-docs task already runs automatically as part of the www build via dependsOn, so the files are regenerated fresh on every website build. There is no need to store them in the repo.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

N/A

timdeschryver and others added 4 commits May 4, 2026 21:18
Add a dedicated GitHub Actions workflow that runs the collect-docs task
weekly (every Sunday at midnight UTC) and on manual trigger. The workflow
builds all NgRx modules, runs the collect-docs script to regenerate API
reference JSON files, and commits any changes back to main using
'[skip ci]' to avoid infinite loops.

Closes #5154

Co-authored-by: Copilot <[email protected]>
Update the collect-docs workflow to create/update a pull request instead of
committing directly to main.

Co-authored-by: Copilot <[email protected]>
Replace the create-pull-request action in the collect-docs workflow with
gh CLI commands that create or update the docs PR.

Co-authored-by: Copilot <[email protected]>
- Fix early-exit check to use git diff --cached after staging files
  so new (untracked) reference JSON files are also detected
- Fix concurrency group to use workflow name only so scheduled
  runs correctly cancel duplicate in-flight runs
- Remove unnecessary fetch-depth: 0

Co-authored-by: Copilot <[email protected]>
@netlify
Copy link
Copy Markdown

netlify Bot commented May 18, 2026

Deploy Preview for ngrx-io ready!

Name Link
🔨 Latest commit 0ea2ced
🔍 Latest deploy log https://app.netlify.com/projects/ngrx-io/deploys/6a0c7447a0d7a700087c7d23
😎 Deploy Preview https://deploy-preview-5156--ngrx-io.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@timdeschryver timdeschryver changed the title Timdeschryver/docs automate api docs generation ci: automate api docs generation May 18, 2026
@markostanimirovic
Copy link
Copy Markdown
Member

@timdeschryver do we need this? It seems that collect-docs is already executed as part of the build process for the website. Here is the example of recently generated API docs for delegatedSignal: https://ngrx.io/api/signals/delegatedSignal

I think we can just remove generated API docs from the repo, add to gitignore, and the rest will work out of the box. 👍

@timdeschryver
Copy link
Copy Markdown
Member Author

@markostanimirovic it seems that you're right! I saw the files and assumed they had to be part of the repo, but reading your comment about it being a part of the build process makes more sense, and it works.
I'll update the PR with your suggest, thanks 👍

The collect-docs task already runs as part of the www build (declared
in dependsOn), so the reference JSON files are regenerated on every
build. There is no need to commit them to the repository.

The .gitignore entry for these files already existed; this commit simply
untracks the 334 JSON files that were previously committed.

Fixes: #5154

Co-authored-by: Copilot <[email protected]>
@timdeschryver timdeschryver changed the title ci: automate api docs generation docs: remove generated API reference files from git tracking May 19, 2026
@timdeschryver
Copy link
Copy Markdown
Member Author

It appears it was a left-over, projects/www/src/app/reference/**/*.json is already included in the gitignore.

@timdeschryver timdeschryver merged commit b685d8b into main May 20, 2026
10 checks passed
@timdeschryver timdeschryver deleted the timdeschryver/docs-automate-api-docs-generation branch May 20, 2026 17:18
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.

Docs: automate API docs generation

3 participants