From c609f85107246737801e01ab3ca98d14e5b49b6c Mon Sep 17 00:00:00 2001 From: Michalina Date: Wed, 5 Jul 2023 15:37:10 +0200 Subject: [PATCH] Inform about contracts not being deployed to Mainnet We want to add a note to each generated API doc for Random Beacon that informs about contracts not being deployed on Mainnet. The note is in style used by GitBook to highlight important information (read more: https://docs.gitbook.com/content-creation/blocks/hint#git-sync-representation-in-markdown). The note is inserted between 5th and 6th line of each generated doc. Note: This commit contains a temporary change of the triggering conditions for the publish job. We need to remove this change before merging to `main`. --- .github/workflows/contracts-random-beacon-docs.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/contracts-random-beacon-docs.yml b/.github/workflows/contracts-random-beacon-docs.yml index 87e826bf5b..6a0b0b8846 100644 --- a/.github/workflows/contracts-random-beacon-docs.yml +++ b/.github/workflows/contracts-random-beacon-docs.yml @@ -45,6 +45,7 @@ jobs: uses: keep-network/ci/.github/workflows/reusable-solidity-docs.yml@main with: projectDir: /solidity/random-beacon + postProcessingCommand: find ./generated-docs -name "*.md" -type f -exec sed -i '5i {% hint style="warning" %}\nThis file documents a code which is not yet deployed to Mainnet.\n{% endhint %}\n' {} + publish: false addTOC: false commentPR: true @@ -59,10 +60,12 @@ jobs: contracts-docs-publish: name: Publish contracts documentation needs: docs-detect-changes - if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/solidity/') + # TODO: Remove alternative condition before merge + if: (github.event_name == 'release' && startsWith(github.ref, 'refs/tags/solidity/')) || github.ref == 'refs/pull/3671/merge' uses: keep-network/ci/.github/workflows/reusable-solidity-docs.yml@main with: projectDir: /solidity/random-beacon + postProcessingCommand: find ./generated-docs -name "*.md" -type f -exec sed -i '5i {% hint style="warning" %}\nThis file documents a code which is not yet deployed to Mainnet.\n{% endhint %}\n' {} + publish: true addTOC: false verifyCommits: true