From b113431198878f0478677845d61c36fdc106b261 Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Mon, 19 Feb 2024 14:41:53 +0100 Subject: [PATCH] fix change detection --- website/scripts/mkdocs_tx_commit.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/website/scripts/mkdocs_tx_commit.sh b/website/scripts/mkdocs_tx_commit.sh index e1375d14..88f78f77 100755 --- a/website/scripts/mkdocs_tx_commit.sh +++ b/website/scripts/mkdocs_tx_commit.sh @@ -2,6 +2,9 @@ set -e +pre-commit install +pre-commit run --files mkdocs.yml || true + if [[ $(git diff --exit-code mkdocs.yml) ]]; then git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" @@ -10,8 +13,6 @@ if [[ $(git diff --exit-code mkdocs.yml) ]]; then if [[ ${GITHUB_EVENT_NAME} == "pull_request" ]]; then # on PR push to the same branch gh pr checkout $(echo "${GITHUB_REF_NAME}" | cut -d/ -f1) - pre-commit install - pre-commit run --files mkdocs.yml || true git add mkdocs.yml git commit -m "Update mkdocs.yml translation" --no-verify git push @@ -20,8 +21,6 @@ if [[ $(git diff --exit-code mkdocs.yml) ]]; then git checkout ${GITHUB_REF_NAME} BRANCH="update-mkdocs-tx-$RANDOM" git checkout -b ${BRANCH} - pre-commit install - pre-commit run --files mkdocs.yml || true git add mkdocs.yml git commit -m "Update mkdocs.yml translation" --no-verify git push -u origin $BRANCH