Skip to content

Commit

Permalink
fix change detection
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Feb 19, 2024
1 parent bc92a34 commit b113431
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions website/scripts/mkdocs_tx_commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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]"
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit b113431

Please sign in to comment.