From dbf76e4de0062b16b9395930aa6b049dfcadf548 Mon Sep 17 00:00:00 2001 From: Shamil <66209982+shamilsan@users.noreply.github.com> Date: Fri, 10 Nov 2023 19:26:25 +0400 Subject: [PATCH 1/3] feat: revive `gear.rs` as a place for internal docs --- .github/dependabot.yml | 10 ++++++++++ .github/workflows/publish.yml | 36 +++++++++++++++++++++++------------ Makefile | 2 +- README.md | 6 +++--- book.toml | 8 ++++---- src/SUMMARY.md | 2 +- src/introduction.md | 14 +++----------- 7 files changed, 46 insertions(+), 32 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..ddfdc9e --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + groups: + deps: + patterns: + - "*" diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 785da0b..05c5743 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,27 +4,39 @@ on: push: branches: [master] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + id-token: write + pages: write + jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - with: - fetch-depth: 0 - name: Setup mdBook uses: peaceiris/actions-mdbook@v1 with: - mdbook-version: "0.4.12" + mdbook-version: "0.4.35" - - run: mdbook build + - name: Build docs + run: mdbook build - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 + - name: Setup GitHub Pages + # if: github.event_name == 'push' + uses: actions/configure-pages@v3 + + - name: Upload Pages artifact + # if: github.event_name == 'push' + uses: actions/upload-pages-artifact@v2 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./book - cname: gear.rs - force_orphan: true - user_name: 'github-actions[bot]' - user_email: 'github-actions[bot]@users.noreply.github.com' + path: book + + - name: Deploy to GitHub Pages + # if: github.event_name == 'push' + uses: actions/deploy-pages@v2 diff --git a/Makefile b/Makefile index 48bf0cd..b92b7ed 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ all: @mdbook build prepare: - @cargo install mdbook --vers "0.4.12" + @cargo install mdbook --vers "0.4.35" serve: @mdbook serve diff --git a/README.md b/README.md index 2618a00..52c3b17 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Gear for Rustaceans -[![Publish Status](https://github.com/gear-tech/gear.rs/workflows/Publish/badge.svg)](https://github.com/gear-tech/gear.rs/actions/workflows/publish.yml?query=branch%3Amaster) +[![Publish Status](https://github.com/gear-tech/gear-tech.github.io/workflows/Publish/badge.svg)](https://github.com/gear-tech/gear.rs/actions/workflows/publish.yml?query=branch%3Amaster) Gear projects navigator for Rust developers. @@ -13,8 +13,8 @@ Gear projects navigator for Rust developers. 1. Clone: ```bash - git clone https://github.com/gear-tech/gear.rs.git - cd gear.rs + git clone https://github.com/gear-tech/gear-tech.github.io.git + cd gear-tech.github.io ``` 2. Install [mdBook](https://github.com/rust-lang/mdBook): diff --git a/book.toml b/book.toml index b1fc093..6d81912 100644 --- a/book.toml +++ b/book.toml @@ -1,6 +1,6 @@ [book] -authors = ["Gear Technologies"] -language = "en" -multilingual = false -src = "src" title = "Gear for Rustaceans" +authors = ["Gear Technologies"] + +[output.html] +git-repository-url = "https://github.com/gear-tech/gear-tech.github.io" diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 71eb5de..007d8f7 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -1,3 +1,3 @@ # Summary -[Introduction](./introduction.md) +[Introduction](introduction.md) diff --git a/src/introduction.md b/src/introduction.md index a491dd8..615e8f1 100644 --- a/src/introduction.md +++ b/src/introduction.md @@ -1,15 +1,7 @@ # Introduction -Here we collect the information helping Rust developers to hack the Gear node, develop Gear smart contracts (a.k.a. programs), etc. +Here we collect the information helping Rust developers deal with the Gear protocol internals. -## Crate Docs +## Disclaimer -The stable crate docs will be posted on [docs.rs](https://docs.rs/) after the Gear crates are published. The latest docs are currently at [docs.gear.rs](https://docs.gear.rs/): - -* **gear-core**: [https://docs.gear.rs/gear_core](https://docs.gear.rs/gear_core/) - - Gear engine for distributed computing core components. - -* **gstd**: [https://docs.gear.rs/gstd](https://docs.gear.rs/gstd/) - - Standard library for Gear smart contracts. +The information provided here is not a part of the official documentation and is not guaranteed to be up-to-date. It is provided as-is and is not covered by any support. Use it at your own risk. From 597b9613bb2b2ce8483a679b605c06b05ab48a78 Mon Sep 17 00:00:00 2001 From: Shamil <66209982+shamilsan@users.noreply.github.com> Date: Fri, 10 Nov 2023 19:28:49 +0400 Subject: [PATCH 2/3] Update publish.yml --- .github/workflows/publish.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 05c5743..c83a6c3 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,6 +1,8 @@ name: Publish on: + pull_request: + branches: [master] push: branches: [master] From cf4e605198a93b38b2d00ce63840e07f8ad1b941 Mon Sep 17 00:00:00 2001 From: Shamil <66209982+shamilsan@users.noreply.github.com> Date: Fri, 10 Nov 2023 19:30:18 +0400 Subject: [PATCH 3/3] Update publish.yml --- .github/workflows/publish.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c83a6c3..661f18b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -30,15 +30,15 @@ jobs: run: mdbook build - name: Setup GitHub Pages - # if: github.event_name == 'push' + if: github.event_name == 'push' uses: actions/configure-pages@v3 - name: Upload Pages artifact - # if: github.event_name == 'push' + if: github.event_name == 'push' uses: actions/upload-pages-artifact@v2 with: path: book - name: Deploy to GitHub Pages - # if: github.event_name == 'push' + if: github.event_name == 'push' uses: actions/deploy-pages@v2