From 13ad2b2f6b6d5bdea2c3927abd33cb0fb34e0c5f Mon Sep 17 00:00:00 2001 From: Michalina Date: Wed, 28 Jun 2023 16:06:58 +0200 Subject: [PATCH] Split contracts API doc into multiple files Having all the contracts documented in one common file turned out to be hard to render by the GitBook. We're switching to documenting each contract file in a separate Markdown file. As the generated files will be much smaller now and GitBook has its own file `ON THIS PAGE` section, we don't need to generate Table of Contents. The one thing that we also change as part of this PR is `rsyncDelete` setting - we'll have it set to `true`, in order to delete documentation of contracts which get removed from the repo. As we're not working directly on a `main` branch, this isn't dangerous (we'll see all the delitions in the PR diff). --- .github/workflows/contracts-ecdsa-docs.yml | 3 +++ .github/workflows/contracts-random-beacon-docs.yml | 3 +++ solidity/ecdsa/hardhat.config.ts | 2 +- solidity/random-beacon/hardhat.config.ts | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/contracts-ecdsa-docs.yml b/.github/workflows/contracts-ecdsa-docs.yml index 1c37f41221..a105b0c2a7 100644 --- a/.github/workflows/contracts-ecdsa-docs.yml +++ b/.github/workflows/contracts-ecdsa-docs.yml @@ -46,6 +46,7 @@ jobs: with: projectDir: /solidity/ecdsa publish: false + addTOC: false commentPR: true exportAsGHArtifacts: true @@ -74,12 +75,14 @@ jobs: with: projectDir: /solidity/ecdsa publish: true + addTOC: false verifyCommits: true destinationRepo: threshold-network/threshold destinationFolder: ./docs/app-development/tbtc-v2/ecdsa-api destinationBaseBranch: main userEmail: 38324465+thesis-valkyrie@users.noreply.github.com userName: Valkyrie + rsyncDelete: true secrets: githubToken: ${{ secrets.THRESHOLD_DOCS_GITHUB_TOKEN }} gpgPrivateKey: ${{ secrets.THRESHOLD_DOCS_GPG_PRIVATE_KEY_BASE64 }} diff --git a/.github/workflows/contracts-random-beacon-docs.yml b/.github/workflows/contracts-random-beacon-docs.yml index ec964968c0..87e826bf5b 100644 --- a/.github/workflows/contracts-random-beacon-docs.yml +++ b/.github/workflows/contracts-random-beacon-docs.yml @@ -46,6 +46,7 @@ jobs: with: projectDir: /solidity/random-beacon publish: false + addTOC: false commentPR: true exportAsGHArtifacts: true @@ -63,12 +64,14 @@ jobs: with: projectDir: /solidity/random-beacon publish: true + addTOC: false verifyCommits: true destinationRepo: threshold-network/threshold destinationFolder: ./docs/app-development/random-beacon/random-beacon-api destinationBaseBranch: main userEmail: 38324465+thesis-valkyrie@users.noreply.github.com userName: Valkyrie + rsyncDelete: true secrets: githubToken: ${{ secrets.THRESHOLD_DOCS_GITHUB_TOKEN }} gpgPrivateKey: ${{ secrets.THRESHOLD_DOCS_GPG_PRIVATE_KEY_BASE64 }} diff --git a/solidity/ecdsa/hardhat.config.ts b/solidity/ecdsa/hardhat.config.ts index 387271acf3..52bad239db 100644 --- a/solidity/ecdsa/hardhat.config.ts +++ b/solidity/ecdsa/hardhat.config.ts @@ -225,7 +225,7 @@ const config: HardhatUserConfig = { docgen: { outputDir: "generated-docs", templates: "docgen-templates", - pages: "single", // `single`, `items` or `files` + pages: "files", // `single`, `items` or `files` exclude: ["./test"], }, } diff --git a/solidity/random-beacon/hardhat.config.ts b/solidity/random-beacon/hardhat.config.ts index dd34526f3a..a4a4092bfb 100644 --- a/solidity/random-beacon/hardhat.config.ts +++ b/solidity/random-beacon/hardhat.config.ts @@ -196,7 +196,7 @@ const config: HardhatUserConfig = { docgen: { outputDir: "generated-docs", templates: "docgen-templates", - pages: "single", // `single`, `items` or `files` + pages: "files", // `single`, `items` or `files` exclude: ["./test"], }, }