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 10 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'
})
29 changes: 0 additions & 29 deletions .github/workflows/docusaurus.yml

This file was deleted.

146 changes: 146 additions & 0 deletions docs/sidebars.yml
Original file line number Diff line number Diff line change
@@ -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.

tutorialSidebar:
- overview

- type: category
label: Getting Started
link:
type: doc
id: getting-started/getting-started
items:
- getting-started/playground-start
- type: category
label: Local Setup
items:
- getting-started/local-setup/local-setup
- getting-started/local-setup/working-with-key-pairs
- getting-started/local-setup/premining-balances
- getting-started/local-setup/setting-up-a-local-chain
- getting-started/local-setup/browsing-gno-source-code

- type: category
label: How-to Guides
link:
type: doc
id: how-to-guides/how-to-guides
items:
- how-to-guides/simple-contract
- how-to-guides/simple-library
- how-to-guides/testing-gno
- how-to-guides/deploy
- how-to-guides/write-simple-dapp
- how-to-guides/creating-grc20
- how-to-guides/connect-from-go
- how-to-guides/connect-wallet-dapp

- type: category
label: Concepts
link:
type: doc
id: concepts/concepts
items:
- concepts/realms
- concepts/packages
- concepts/namespaces
- type: category
label: Standard Libraries
link:
type: doc
id: concepts/stdlibs/stdlibs
items:
- concepts/stdlibs/banker
- concepts/stdlibs/coin
- concepts/stdlibs/gnopher-hole-stdlib
- concepts/gnovm
- concepts/gno-language
- concepts/testnets
- concepts/effective-gno
- concepts/proof-of-contribution
- concepts/tendermint2
- concepts/portal-loop
- concepts/gno-modules
- concepts/gno-test
- concepts/from-go-to-gno

- type: category
label: Gno Tooling
link:
type: doc
id: gno-tooling/gno-tooling
items:
- gno-tooling/cli/gno-tooling-gno
- gno-tooling/cli/gno-tooling-gnokey
- gno-tooling/cli/gno-tooling-gnodev
- gno-tooling/cli/gno-tooling-gnoland
- type: category
label: gnofaucet
link:
type: doc
id: gno-tooling/cli/faucet/gno-tooling-gnofaucet
items:
- gno-tooling/cli/faucet/running-a-faucet

- type: category
label: Reference
link:
type: doc
id: reference/reference
items:
- reference/rpc-endpoints
- reference/network-config
- type: category
label: Standard Libraries
link:
type: doc
id: reference/stdlibs/stdlibs
items:
- type: category
label: std
items:
- reference/stdlibs/std/address
- reference/stdlibs/std/banker
- reference/stdlibs/std/coin
- reference/stdlibs/std/coins
- reference/stdlibs/std/chain
- reference/stdlibs/std/testing

- reference/go-gno-compatibility

- type: category
label: tm2-js-client
link:
type: doc
id: reference/tm2-js-client/tm2-js-client
items:
- reference/tm2-js-client/tm2-js-wallet
- type: category
label: Provider
items:
- reference/tm2-js-client/Provider/tm2-js-provider
- reference/tm2-js-client/Provider/tm2-js-json-rpc-provider
- reference/tm2-js-client/Provider/tm2-js-ws-provider
- reference/tm2-js-client/Provider/tm2-js-utility
- type: category
label: Signer
items:
- reference/tm2-js-client/Signer/tm2-js-signer
- reference/tm2-js-client/Signer/tm2-js-key
- reference/tm2-js-client/Signer/tm2-js-ledger

- type: category
label: gno-js-client
link:
type: doc
id: reference/gno-js-client/gno-js-client
items:
- reference/gno-js-client/gno-js-provider
- reference/gno-js-client/gno-js-wallet

- type: category
label: gnoclient
link:
type: doc
id: reference/gnoclient/gnoclient
items:
- reference/gnoclient/signer
- reference/gnoclient/client
27 changes: 27 additions & 0 deletions misc/docs.gno.land/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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.


services:
docusaurus:
image: ghcr.io/gnolang/docs.gno.land:dev
volumes:
- ../../docs:/app/docs
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
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.

Loading
Loading