Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,23 @@ jobs:
lektor plugins reinstall
sudo apt update -y
sudo apt install -y --no-install-recommends gettext
- name: Configure Weblate
env:
WEBLATE_API_TOKEN: ${{ secrets.WEBLATE_API_TOKEN }}
run: |
mkdir -p ~/.config && cat <<EOF > ~/.config/weblate
[weblate]
url = https://hosted.weblate.org/api/
key = $WEBLATE_API_TOKEN
translation = weblate/application
EOF
- name: Lock Weblate and Sync
run: |
wlc commit
wlc lock
wlc push
git pull origin

- name: Build site
run: |
lektor build --no-prune
Expand All @@ -64,6 +81,15 @@ jobs:
git commit -m "Update translations to $(git rev-parse --short HEAD)."
git push origin

- name: Ensure Weblate has current updates
if: steps.updated.outputs.updated == 'true'
run: |
wlc pull

- name: Unlock Weblate
run: |
wlc unlock

- name: Publish site
env:
LEKTOR_DEPLOY_USERNAME: brutusthebee
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ requests==2.32.4
text-unidecode==1.3
urllib3==2.5.0
watchdog==6.0.0
wlc==1.15