Skip to content

Commit c93e46d

Browse files
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).
1 parent 898dc9e commit c93e46d

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.github/workflows/contracts-ecdsa-docs.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ jobs:
4646
with:
4747
projectDir: /solidity/ecdsa
4848
publish: false
49+
addTOC: false
4950
commentPR: true
5051
exportAsGHArtifacts: true
5152

@@ -55,7 +56,7 @@ jobs:
5556
contracts-docs-prepublish-wait:
5657
name: Wait for contracts docs to be published
5758
needs: docs-detect-changes
58-
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/solidity/')
59+
if: (github.event_name == 'release' && startsWith(github.ref, 'refs/tags/solidity/')) || github.ref == 'refs/pull/584/merge'
5960
runs-on: ubuntu-latest
6061
steps:
6162
- name: Wait 4 minutes
@@ -74,12 +75,14 @@ jobs:
7475
with:
7576
projectDir: /solidity/ecdsa
7677
publish: true
78+
addTOC: false
7779
verifyCommits: true
7880
destinationRepo: threshold-network/threshold
7981
destinationFolder: ./docs/app-development/tbtc-v2/ecdsa-api
8082
destinationBaseBranch: main
8183
userEmail: [email protected]
8284
userName: Valkyrie
85+
rsyncDelete: true
8386
secrets:
8487
githubToken: ${{ secrets.THRESHOLD_DOCS_GITHUB_TOKEN }}
8588
gpgPrivateKey: ${{ secrets.THRESHOLD_DOCS_GPG_PRIVATE_KEY_BASE64 }}

.github/workflows/contracts-random-beacon-docs.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ jobs:
4646
with:
4747
projectDir: /solidity/random-beacon
4848
publish: false
49+
addTOC: false
4950
commentPR: true
5051
exportAsGHArtifacts: true
5152

@@ -58,17 +59,19 @@ jobs:
5859
contracts-docs-publish:
5960
name: Publish contracts documentation
6061
needs: docs-detect-changes
61-
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/solidity/')
62+
if: (github.event_name == 'release' && startsWith(github.ref, 'refs/tags/solidity/')) || github.ref == 'refs/pull/3657/merge'
6263
uses: keep-network/ci/.github/workflows/reusable-solidity-docs.yml@main
6364
with:
6465
projectDir: /solidity/random-beacon
6566
publish: true
67+
addTOC: false
6668
verifyCommits: true
6769
destinationRepo: threshold-network/threshold
6870
destinationFolder: ./docs/app-development/random-beacon/random-beacon-api
6971
destinationBaseBranch: main
7072
userEmail: [email protected]
7173
userName: Valkyrie
74+
rsyncDelete: true
7275
secrets:
7376
githubToken: ${{ secrets.THRESHOLD_DOCS_GITHUB_TOKEN }}
7477
gpgPrivateKey: ${{ secrets.THRESHOLD_DOCS_GPG_PRIVATE_KEY_BASE64 }}

0 commit comments

Comments
 (0)