Skip to content

Commit f8767dc

Browse files
authored
Pull Weblate Changes Before Updating Translations
1 parent c55837b commit f8767dc

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,27 @@ jobs:
5858
if: steps.updated.outputs.updated == 'true'
5959
env:
6060
GITHUB_TOKEN: ${{ github.token }}
61+
WEBLATE_API_TOKEN: ${{ secrets.WEBLATE_API_TOKEN }}
6162
run: |
63+
pip install wlc
64+
mkdir -p ~/.config && cat <<EOF > ~/.config/weblate
65+
[weblate]
66+
url = https://hosted.weblate.org/api/
67+
key = $WEBLATE_API_TOKEN
68+
translation = weblate/application
69+
EOF
70+
wlc lock
71+
wlc push
72+
git pull origin
73+
6274
# Commit the updated PO files.
6375
git add i18n
6476
git commit -m "Update translations to $(git rev-parse --short HEAD)."
6577
git push origin
6678
79+
wlc push
80+
wlc unlock
81+
6782
- name: Publish site
6883
env:
6984
LEKTOR_DEPLOY_USERNAME: brutusthebee

0 commit comments

Comments
 (0)