diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4aa98bdfed..ddf292ffa7 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -41,6 +41,23 @@ jobs: lektor plugins reinstall sudo apt update -y sudo apt install -y --no-install-recommends gettext + - name: Setup Weblate Install and Configurations + env: + WEBLATE_API_TOKEN: ${{ secrets.WEBLATE_API_TOKEN }} + run: | + pip install wlc + mkdir -p ~/.config && cat < ~/.config/weblate + [weblate] + url = https://hosted.weblate.org/api/ + key = $WEBLATE_API_TOKEN + translation = weblate/application + EOF + - name: Lock and Sync with Weblate + run: | + wlc lock + wlc push + git pull origin + - name: Build site run: | lektor build --no-prune @@ -64,6 +81,12 @@ jobs: git commit -m "Update translations to $(git rev-parse --short HEAD)." git push origin + - name: Unlock Weblate and Remove Configuration + run: | + wlc push + wlc unlock + rm ~/.config/weblate + - name: Publish site env: LEKTOR_DEPLOY_USERNAME: brutusthebee