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 56eaba2 commit 2c2ad3d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ jobs:
./scripts/mkdocs_tx.py -s fr update_config
./scripts/mkdocs_tx_commit.sh
env:
GITHUB_HEADREF: ${{ github.head_ref }}
GITHUB_EVENT: ${{ github.event_name }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
4 changes: 2 additions & 2 deletions website/scripts/mkdocs_tx_commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

if [[ $(git diff --exit-code mkdocs.yml) ]]; then
echo "detected changes in mkdocs.yml"
if [[ GITHUB_EVENT == "pull_request" ]]; then
if [[ ${GITHUB_EVENT} == "pull_request" ]]; then
# 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
else
# on push create a pull request
git checkout ${{ github.head_ref }}
git checkout ${GITHUB_HEADREF}
git checkout -b update-mkdocs-tx
git commit -m "Update mkdocs.yml translation"
gh pr create -B update-mkdocs-tx -H update-mkdocs-tx --title 'Update mkdocs translations'
Expand Down

0 comments on commit 2c2ad3d

Please sign in to comment.