From 1da5beca4c3f70aed67900ceebe25702c8c55a8c Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Mon, 19 Feb 2024 13:51:03 +0100 Subject: [PATCH] fix --- website/scripts/mkdocs_tx_commit.sh | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/website/scripts/mkdocs_tx_commit.sh b/website/scripts/mkdocs_tx_commit.sh index 54c83999..3e66b583 100755 --- a/website/scripts/mkdocs_tx_commit.sh +++ b/website/scripts/mkdocs_tx_commit.sh @@ -8,21 +8,20 @@ if [[ $(git diff --exit-code mkdocs.yml) ]]; then echo "detected changes in mkdocs.yml" if [[ ${GITHUB_EVENT_NAME} == "pull_request" ]]; then - echo "mkdocs is not updated from a PR" # on PR push to the same branch - # gh pr checkout ${{ github.event.pull_request.number }} - # git add mkdocs.yml - # git commit -m "Update mkdocs.yml translation" - # git push + gh pr checkout ${{ github.event.pull_request.number }} + git add mkdocs.yml + git commit -m "Update mkdocs.yml translation" + git push else - # on push create a pull request + # on push/workflow_dispatch create a pull request git checkout ${GITHUB_REF_NAME} BRANCH="update-mkdocs-tx-$RANDOM" pre-commit install git checkout -b ${BRANCH} git add mkdocs.yml - pre-commit run --files mkdocs.yml || true - git commit -m "Update mkdocs.yml translation" + pre-commit run --files mkdocs.yml + git commit -m "Update mkdocs.yml translation" --no-verify git push -u origin $BRANCH echo "gh pr create -B ${GITHUB_REF_NAME} -H ${BRANCH} --title 'Update mkdocs translations' --body 'run from mkdocs_tx'" gh pr create -B ${GITHUB_REF_NAME} -H ${BRANCH} --title 'Update mkdocs translations' --body 'run from mkdocs_tx'