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
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/deploy-docs.yml
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

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: deploy docs on gnolang/docs.gno.land repository
on:
push:
branches:
- master
paths:
- "docs/**"

jobs:
trigger-netlify-docs-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
with:
github-token: ${{ secrets.DOCS_DEPLOY_PAT }}
script: |
await github.rest.actions.createworkflowDispatch({
owner: 'gnolang',
repo: 'docs.gno.land',
workflow_id: 'netlify.yml',
ref: 'main'
})
28 changes: 28 additions & 0 deletions docs/docker-compose.yml
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/.

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: "3"

services:
docusaurus:
image: ghcr.io/gnolang/docs.gno.land:dev
volumes:
- .:/app/docs
- ./sidebars.js:/app/docusaurus/sidebar.js
ports:
- 3000:3000
environment:
- MEILISEARCH_URL="localhost:7700"
- MEILISEARCH_API_KEY="masterKey"
- MEILISEARCH_INDEX_UID="dev"

meilisearch:
image: getmeili/meilisearch:latest
restart: unless-stopped
environment:
- MEILI_MASTER_KEY=masterKey
- MEILI_NO_ANALYTICS=true
- MEILI_ENV=development
- MEILI_LOG_LEVEL=info
- MEILI_DB_PATH=/data.ms
ports:
- 7700:7700
#volumes:
# - ./data.ms:/data.ms
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.

File renamed without changes.
21 changes: 0 additions & 21 deletions misc/docusaurus/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion misc/docusaurus/.yarnrc.yml

This file was deleted.

3 changes: 0 additions & 3 deletions misc/docusaurus/babel.config.js

This file was deleted.

183 changes: 0 additions & 183 deletions misc/docusaurus/docusaurus.config.js

This file was deleted.

47 changes: 0 additions & 47 deletions misc/docusaurus/package.json

This file was deleted.

Loading
Loading