-
-
Notifications
You must be signed in to change notification settings - Fork 818
Pull Weblate Changes Before Updating Translations #686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
f8767dc
bb4b901
2d2cf21
0fe68a0
c81a5cd
328cadc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -41,6 +41,24 @@ 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 <<EOF > ~/.config/weblate | ||||
| [weblate] | ||||
| url = https://hosted.weblate.org/api/ | ||||
| key = $WEBLATE_API_TOKEN | ||||
| translation = weblate/application | ||||
| EOF | ||||
| - name: Lock and Sync with Weblate | ||||
johnzhou721 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||
| run: | | ||||
| wlc commit | ||||
| wlc lock | ||||
| wlc push | ||||
| git pull origin | ||||
|
|
||||
| - name: Build site | ||||
| run: | | ||||
| lektor build --no-prune | ||||
|
|
@@ -64,6 +82,12 @@ jobs: | |||
| git commit -m "Update translations to $(git rev-parse --short HEAD)." | ||||
| git push origin | ||||
|
|
||||
| - name: Unlock Weblate and Remove Configuration | ||||
| run: | | ||||
| wlc pull | ||||
| wlc unlock | ||||
| rm ~/.config/weblate | ||||
|
||||
| rm ~/.config/weblate |
We should probably also split this into two parts - the pull (which is only needed if there have been updates), and the unlock (which is always needed).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't version locked; we should just add wlc to the site requirements.