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

chore: trigger docs deploy #1801

Merged
merged 13 commits into from
Apr 29, 2024
Merged

chore: trigger docs deploy #1801

merged 13 commits into from
Apr 29, 2024

Conversation

albttx
Copy link
Member

@albttx albttx commented Mar 20, 2024

This trigger the github action netlify.yml on gnolang/docs.gno.land when a merge is done on master and the docs/ folder have updates.

I will need someone (cc: @moul ) to create and add a PAT to this repo secret 🙏🏼

EDIT:

This PR:

  • Bring a dev env for the docs.
  • Add github action to call gnolang/docs.gno.land netlify deploy action

I'm currently working on a netlify preview, but it's a bit more complexe than expected, it will come in another PR.

Contributors' checklist...
  • Added new tests, or not needed, or not feasible
  • Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • Updated the official documentation or not needed
  • No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • Added references to related issues and PRs
  • Provided any useful hints for running manual tests
  • Added new benchmarks to generated graphs, if any. More info here.

@albttx albttx requested review from moul and a team as code owners March 20, 2024 14:49
Copy link

codecov bot commented Mar 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 48.25%. Comparing base (a7881ca) to head (6f870b6).
Report is 20 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #1801    +/-   ##
========================================
  Coverage   48.25%   48.25%            
========================================
  Files         408      409     +1     
  Lines       62338    62515   +177     
========================================
+ Hits        30081    30168    +87     
- Misses      29749    29824    +75     
- Partials     2508     2523    +15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

Choose a reason for hiding this comment

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

rm netlify.toml on this repo? :)

Copy link
Member Author

@albttx albttx Mar 20, 2024

Choose a reason for hiding this comment

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

+ rm -rf misc/docusaurus ;)

Copy link
Contributor

@leohhhn leohhhn Mar 20, 2024

Choose a reason for hiding this comment

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

I don't think we should be removing misc/docusaurus, at least not until we have a preview deployment of ongoing docs/ or docusaurus PRs. This is because this is currently the only way to preview how the change in the docs will look like while making it. Also, the sidebar ordering is done in the docusaurus folder.

Copy link
Member Author

Choose a reason for hiding this comment

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

@leohhhn production has already been migrated to the repository gnolang/docs.gno.land.

So any changes in misc/docusaurus won't have any preview anymore. The search engine isn't developed here either.
IF there is missing stuff in gnolang/docs.gno.land, we must migrate them right now.

Keeping misc/docusaurus will only lead to confusions

Copy link
Contributor

Choose a reason for hiding this comment

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

Here are two critical points regarding this PR:

  1. Markdown content & docusaurus config are coupled. They both combine to make the docs the way they are.
  2. People need to be able to preview the changes they are making to the docs in the docusaurus environment, not only in a simple markdown render.

I suggest we keep the working versions of both docs/ and misc/docusaurus in the monorepo, and on each merge to master a CI copies over both folders to the docs.gno.land repo, and deploys over there.

If there is another way to fulfill both of the points above, please let me know.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, I know how to handle that, I'll work on it!

Copy link
Member

Choose a reason for hiding this comment

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

@albttx
What's the status on this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Still a work in progress, i made improvement today

Copy link
Contributor

@leohhhn leohhhn left a comment

Choose a reason for hiding this comment

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

@albttx Please reference the comment I left above before merging
https://github.com/gnolang/gno/pull/1801/files#r1532504955

@zivkovicmilos
Copy link
Member

@albttx What is the status of this PR?

@albttx
Copy link
Member Author

albttx commented Apr 8, 2024

Hey @zivkovicmilos, if it's good for you, let's first merge this PR, as it is.
It will required to make a second PR on gnolang/docs.gno.land to update the sidebar.js file.

I'll work on a solution on a separate pull request.

@albttx albttx requested a review from a team as a code owner April 24, 2024 12:05
@albttx
Copy link
Member Author

albttx commented Apr 24, 2024

link with : gnolang/docs.gno.land#21

@leohhhn
Copy link
Contributor

leohhhn commented Apr 25, 2024

Ok, so from what I understand:

  • This PR adds a docker image to the docs/ folder, that will pull the misc files from the docs.gno.land repo for a preview. This image can be used for a local preview and will be also used to run the CI preview on this repo.
  • This PR adds the actual dev image to be pulled by the monorepo, and adds a prod image for the actual deployment of the docs.

@albttx can you please confirm that this is the setup?

docs/sidebars.js Outdated
Copy link
Member

Choose a reason for hiding this comment

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

no JS.

yaml, whatever, but no JS.

Copy link
Member

@moul moul Apr 26, 2024

Choose a reason for hiding this comment

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

Just a reminder: The purpose of the docs folder is to be embedded in gnoweb. See #522 (comment).

I suggest using simple filenames with prefixes, such as 000_hello_world.md, 050_foo.md, etc.

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 put a yaml file.

Maybe we can in another PR think to have a different solution using the markdown header to gathers the informations + prefixes as you mentionned.

Copy link
Member

@moul moul left a comment

Choose a reason for hiding this comment

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

see my last comments.

Copy link
Member

@moul moul Apr 26, 2024

Choose a reason for hiding this comment

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

Please delete this file from the repository. If necessary, relocate it to misc/, but I believe it's not essential.

Copy link
Member Author

Choose a reason for hiding this comment

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

This was asked to get a dev env when developing on the docs website to have a preview.

https://github.com/gnolang/gno/pull/1801/files#r1532504955

Copy link
Member

Choose a reason for hiding this comment

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

OK, but please, do it in the other repository.

The other repository should focus on docs.gno.land for development and production. It should include a command to "fetch docs/" from the main repository for both development and production purposes.

docs.gno.land is not a development tool linked to the monorepo. The docs/ folder should solely contain documentation, not web content, scripts, etc.

The thing to do in the current repo is to update gnoweb to embed docs/.

moul added a commit that referenced this pull request Apr 26, 2024
@moul moul mentioned this pull request Apr 26, 2024
@albttx
Copy link
Member Author

albttx commented Apr 26, 2024

Hello @moul , i just updated following your request.

wdyt ?

@@ -0,0 +1,27 @@
version: "3"
Copy link
Member

Choose a reason for hiding this comment

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

Why can't you simply move this file to the other repository?

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'm fine not having it... But i don't know if it's will be really confortable to get easy preview of the docs when working on it...

@leohhhn what do you think ?

Copy link
Member

@moul moul Apr 27, 2024

Choose a reason for hiding this comment

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

Read this: #1801 (comment)

If writing or previewing documents doesn't solely rely on having a basic editor and using the GitHub markdown preview, we must promptly remove the risky tool you've installed.

@@ -0,0 +1,146 @@
---
Copy link
Member

Choose a reason for hiding this comment

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

It's not related to the docs. It's barely parseable by Gnoweb.

Please, consider my proposal to use numbered prefixes files and completely remove this file.

If you have valid reasons for not using my suggestion, please create a YAML file for documentation in the "docs/" directory. The file should contain only essential information relevant to docs/, editors, and gnoweb. Let's focus on what truly matters.

Everything related to docs.gno.land should be on the standalone website docs.gno.land, except for the .github/workflows trigger, in case a crontab is insufficient.

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 understand your position, i first update following your comment asking no js, or for json or yaml ( cf: #1801 (comment) )

But i guess the easiest solutions is to keep a .js file inside the gnolang/docs.gno.land repository and make a PR on the docs.gno.land repository when it's required to update the sidebars.

Copy link
Member

Choose a reason for hiding this comment

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

The main issue is the existence of docs.gno.land. It's crucial to ensure that docs/ remains maintainable with an editor and GitHub. Imagine not having docs.gno.land. In such a case, managing page order should be done simply using markdown/filesystem in docs/. docs.gno.land should focus on theme, search engine, and deployment, without overshadowing the usefulness of the docs/ folder. Let's prioritize clarity in the docs/ folder.

@moul moul merged commit de2fc45 into master Apr 29, 2024
183 of 186 checks passed
@moul moul deleted the ci/trigger-docs-deploy branch April 29, 2024 15:30
thehowl added a commit that referenced this pull request May 2, 2024
Addresses
#1801 (comment)
Related with #1765

---------

Co-authored-by: Morgan <morgan@morganbaz.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants