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

feat(scripts): push to docs on release #3196

Merged
merged 5 commits into from
Jun 18, 2024
Merged

Conversation

shortcuts
Copy link
Member

@shortcuts shortcuts commented Jun 17, 2024

🧭 What and Why

🎟 JIRA Ticket: https://algolia.atlassian.net/browse/DI-2458

Changes included:

bring back our beloved spread script, which publishes to the official documentation:

  • the documentation specs
  • the generated code snippets
  • the SLA chart and PNGs

we only spread after a successful release, see example PR here: https://github.com/algolia/doc/pull/9098

@shortcuts shortcuts self-assigned this Jun 17, 2024
@algolia-bot
Copy link
Collaborator

algolia-bot commented Jun 17, 2024

✗ The generated branch has been deleted.

If the PR has been merged, you can check the generated code on the main branch.
You can still access the code generated on main via this commit.

Copy link

github-actions bot commented Jun 17, 2024

Base automatically changed from chore/sla-markdown to main June 17, 2024 15:55
@shortcuts shortcuts force-pushed the feat/scripts-push-to-docs branch from 44823d4 to ed6ad01 Compare June 17, 2024 15:56
@shortcuts shortcuts marked this pull request as ready for review June 17, 2024 15:56
@shortcuts shortcuts requested a review from a team as a code owner June 17, 2024 15:56
@shortcuts shortcuts requested review from damcou and millotp June 17, 2024 15:56
@github-actions github-actions bot temporarily deployed to pull request June 17, 2024 16:33 Inactive
Copy link
Collaborator

@millotp millotp left a comment

Choose a reason for hiding this comment

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

nice

@@ -145,9 +145,15 @@ async function transformBundle({
: ({} as SnippetSamples);

if (docs) {
const snippets = transformCodeSamplesToGuideMethods(JSON.parse(JSON.stringify(snippetSamples)));
// the JS file will be removed once algolia/doc leverages the JSON one
Copy link
Collaborator

Choose a reason for hiding this comment

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

we should support the JSON one you mean, the js one is for our doc.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes but the JS one will be removed once the doc is live that's what i meant

Copy link
Collaborator

Choose a reason for hiding this comment

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

so we plan on removing our doc entirely ? :(

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup at least for GA, @kai687 has great plans for it!

@@ -0,0 +1,92 @@
/* eslint-disable no-console */
Copy link
Collaborator

Choose a reason for hiding this comment

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

which version of the file did you take for this ? there was a lot of bug fixes done to the previous one

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 think the last but you are right I'll double check!

Comment on lines +49 to +51
await run(`cp ${toAbsolutePath('specs/bundled/*.doc.yml')} ${dest}`);
await run(`cp ${toAbsolutePath('config/release.config.json')} ${dest}`);
await run(`cp ${toAbsolutePath('website/src/generated/*.json')} ${dest}`);
Copy link
Collaborator

Choose a reason for hiding this comment

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

the snippets are already contained in the bundled spec, is it necessary to also send the json file ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup it's so that they can leverage the JSONs for the guides like we did!

Copy link
Collaborator

Choose a reason for hiding this comment

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

we had to do this to have both the snippets for redoc, and the snippets for custom guide, are they using the same techno ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup! Given the time constraint it seems like the better, wdyt?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't know how well this will work with ruby but why not !

Copy link
Member Author

@shortcuts shortcuts Jun 18, 2024

Choose a reason for hiding this comment

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

I believe fine, since it's simple json input but at least it gives @kai687 the opportunity to try the current solution

@shortcuts shortcuts enabled auto-merge (squash) June 18, 2024 07:57
@github-actions github-actions bot temporarily deployed to pull request June 18, 2024 08:24 Inactive
@shortcuts shortcuts merged commit 6412664 into main Jun 18, 2024
21 checks passed
@shortcuts shortcuts deleted the feat/scripts-push-to-docs branch June 18, 2024 08:25
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