From 123585b02ec0e7ef43f8cc223df2eab68eeee5b8 Mon Sep 17 00:00:00 2001 From: dave | d1onys1us <13951458+d1onys1us@users.noreply.github.com> Date: Tue, 27 Dec 2022 10:30:06 -0500 Subject: [PATCH] feat(docs): autocommit changes to solidity docs --- .github/workflows/solidity.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/solidity.yml b/.github/workflows/solidity.yml index faa840b6c4f..1a1a6e778e3 100644 --- a/.github/workflows/solidity.yml +++ b/.github/workflows/solidity.yml @@ -56,15 +56,21 @@ jobs: working-directory: ./packages/protocol run: pnpm export:abi - - name: protocol - Generate Docs + - name: protocol - Generate docs working-directory: ./packages/protocol run: pnpm export:docs - # auto commit solidity doc changes unless on main branch - - uses: stefanzweifel/git-auto-commit-action@v4 - if: github.ref != 'refs/heads/main' - with: - commit_message: "chore(docs): auto commit solidity docs" + - name: protocol - Check for changes in docs + working-directory: ./packages/protocol + run: | + git diff --exit-code --quiet ./packages/website/docs/smart-contracts + if [ $? -eq 0 ]; then + echo "No changes to ./packages/website/docs/smart-contracts" + exit 0 + else + echo "Make sure to run 'pnpm export:docs' and commit the changes." + exit 1 + fi - name: protocol - Deploy L1 Contracts working-directory: ./packages/protocol