Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Run readme generation in build #18198

Merged
merged 1 commit into from
Nov 7, 2023

Conversation

tylerbutler
Copy link
Member

@tylerbutler tylerbutler commented Nov 7, 2023

The scripts and tools we use to generate readme contents in the repo has never been run as part of the main build. This PR adds a step to the build, build:readme which calls markdown-magic to regen the readmes across the repo, excluding the docs folder.

There are similar scripts in the docs package. Those don't need to be modified; they're just a little unnecessary now.

I also updated the repo-wide policy CI workflow (the one that runs on every PR) to no longer run the root prettier script (it's now part of the build) and runs build:readme instead. This will catch any changes outside the client release group, since md-magic runs repo-wide.

@tylerbutler tylerbutler requested review from msfluid-bot and a team as code owners November 7, 2023 21:01
@github-actions github-actions bot added area: examples Changes that focus on our examples dependencies Pull requests that update a dependency file base: main PRs targeted against main branch labels Nov 7, 2023
@@ -27,6 +27,7 @@
"build:gendocs:client:packages": "copyfiles \"packages/**/*.api.json\" ./_api-extractor-temp/doc-models/ -e \"**/node_modules/**\" -f -V",
"build:gendocs:server": "concurrently \"npm:build:gendocs:server:*\"",
"build:gendocs:server:routerlicious": "copyfiles \"server/routerlicious/**/*.api.json\" ./_api-extractor-temp/doc-models/ -e \"**/node_modules/**\" -f -V",
"build:readme": "markdown-magic --files \"**/*.md\" !docs",
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we remove this step from the docs build now that we have it here?

Copy link
Member Author

Choose a reason for hiding this comment

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

I thought about that, but since the docs build imports stuff from elsewhere in the repo, seemed good to leave it as a step in the "docs build."

Copy link
Contributor

@Josmithr Josmithr left a comment

Choose a reason for hiding this comment

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

So excited to have these changes! And equally psyched at how easy it was to add to fluid-build now!!

@tylerbutler tylerbutler merged commit eeb4bea into microsoft:main Nov 7, 2023
@tylerbutler tylerbutler deleted the readme-check branch November 7, 2023 22:09
tylerbutler added a commit that referenced this pull request Nov 10, 2023
PR #18198 added a dependency to the root that caused a peer dependency
warning. The dep is not needed at the root, so I added it to the peer
dep overrides.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: examples Changes that focus on our examples base: main PRs targeted against main branch dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants