Skip to content

Commit

Permalink
update workflows, embed
Browse files Browse the repository at this point in the history
  • Loading branch information
leohhhn committed Feb 28, 2025
1 parent a3d9555 commit 661bde4
Show file tree
Hide file tree
Showing 16 changed files with 51 additions and 17 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/docs-generate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Docs Generate

on:
pull_request:
paths:
- 'docs/**'

jobs:
embed:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22.7'

- name: make gen
run:
cd docs/ && make gen -B

- name: Check if there is a diff
run: |
diff=$(git status --porcelain)
if [[ $diff ]]; then
echo 'Please run `make build` to update the sidebar.js file!'
exit 1
fi
2 changes: 1 addition & 1 deletion .github/workflows/docs-sidebar-linter.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Update Sidebar
name: Docs Sidebar

on:
pull_request:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs-url-linter.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Docs Linter
name: Docs

on:
push:
Expand All @@ -9,7 +9,7 @@ on:
- "docs/**"

jobs:
build:
lint-urls:
runs-on: ubuntu-latest

steps:
Expand Down
7 changes: 5 additions & 2 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
MISC_DOCS=../misc/docs

build: $(MISC_DOCS)/docusaurus/static/sidebar.json
build: $(MISC_DOCS)/docusaurus/static/sidebar.json gen

$(MISC_DOCS)/docusaurus/static/sidebar.json: README.md
go build -C $(MISC_DOCS)/tools/indexparser -o ./build
$(MISC_DOCS)/tools/indexparser/build -path ../docs/README.md > $(MISC_DOCS)/docusaurus/static/sidebar.json

# Run the linter for the docs/ folder
# Run the link linter for the docs/ folder
lint:
go build -C $(MISC_DOCS)/tools/linter -o ./build
$(MISC_DOCS)/tools/linter/build -path ../docs

gen:
go run -modfile ../misc/devdeps/go.mod github.com/campoy/embedmd -w `find . -name "*.md"`

dev:
cd $(MISC_DOCS)/docusaurus/ && yarn start

Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ Find references for package APIs, RPC endpoints, network configurations, and mor
- [tx-indexer](https://github.com/gnolang/tx-indexer)
- [tx-archive](https://github.com/gnolang/tx-archive)
- [gno-js-client](https://github.com/gnolang/gno-js-client)
- [tm2-js-client](https://github.com/gnolang/tm2-js-client)
- [tm2-js-client](https://github.com/gnolang/tm2-js-client)
2 changes: 1 addition & 1 deletion docs/concepts/realms.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,4 @@ std.CurrentRealm() => Realm {
}
```

Check out the realm reference page [here](../reference/std.md#realm).
Check out the realm reference page [here](../reference/std.md#realm).
2 changes: 1 addition & 1 deletion docs/concepts/stdlibs/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ data:
```

You can fetch the ABCI response of a specific block by using the `/block_results`
RPC endpoint.
RPC endpoint.
2 changes: 1 addition & 1 deletion docs/concepts/stdlibs/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ where you cloned the Gno repository.

```sh
export GNOROOT=$HOME/gno
```
```
2 changes: 1 addition & 1 deletion docs/concepts/testnets.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,4 @@ Release commit: [652dc7a](https://github.com/gnolang/gno/commit/652dc7a3a62ee043
The first Gno testnet. Find archive data [here](https://github.com/gnolang/tx-exports/tree/main/test1.gno.land).

Launch date: May 6th 2022
Release commit: [797c7a1](https://github.com/gnolang/gno/commit/797c7a132d65534df373c63b837cf94b7831ac6e)
Release commit: [797c7a1](https://github.com/gnolang/gno/commit/797c7a132d65534df373c63b837cf94b7831ac6e)
2 changes: 1 addition & 1 deletion docs/getting-started/becoming-a-gnome.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ communication, you can grow as a contributor and leave a lasting impact.

Becoming a Gnome is a journey of learning, collaboration, and
creativity. By embracing these principles and finding ways to showcase your work,
you can help shape the future of gno.land while staying true to your own path.
you can help shape the future of gno.land while staying true to your own path.
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,4 @@ That's it 🎉

You've successfully run local tests and expressions using the `gno` binary.
Next, let's jump into how to create a Gno key pair, which is crucial to deploying
your code and interacting with the gno.land blockchain.
your code and interacting with the gno.land blockchain.
2 changes: 1 addition & 1 deletion docs/getting-started/exploring-gnoland.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@ blockchain environment.

Get started writing Gno code by visiting the next tutorial.

[^1]: gno.land also has a standard library, which is [built directly into the GnoVM](https://github.com/gnolang/gno/tree/master/gnovm/stdlibs).
[^1]: gno.land also has a standard library, which is [built directly into the GnoVM](https://github.com/gnolang/gno/tree/master/gnovm/stdlibs).
2 changes: 1 addition & 1 deletion docs/getting-started/writing-gno.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,4 @@ found online.
## Conclusion

Congratulations! You've just created your first Gno application, along with tests
to confirm it's working properly.
to confirm it's working properly.
2 changes: 1 addition & 1 deletion docs/reference/network-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ All networks follow the same pattern for websocket connections:

```shell
wss://<rpc-endpoint:port>/websocket
```
```
2 changes: 1 addition & 1 deletion docs/reference/rpc-endpoints.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# RPC Endpoints
# RPC Endpoints
2 changes: 1 addition & 1 deletion docs/reference/std.md
Original file line number Diff line number Diff line change
Expand Up @@ -747,4 +747,4 @@ Creates a new code realm for testing purposes.
```go
path := "gno.land/r/demo/boards"
codeRealm := std.NewCodeRealm(path)
```
```

0 comments on commit 661bde4

Please sign in to comment.