Skip to content

Commit

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

0 comments on commit 1da5bec

Please sign in to comment.