Skip to content

Commit

Permalink
Update sphinx.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
cristiangirlea committed Jun 30, 2023
1 parent ceb5cc7 commit 91d9e28
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,24 @@ on:
workflow_dispatch:
push:
paths:
- 'docs/**'
- 'docs/index.rst'
branches:
- 'master'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

# Build documentation with gettext builder to generate .pot files
- uses: ammaraskar/sphinx-action@master
with:
build-command: "sphinx-build -b gettext . locales"

# Configure Git
build-command: "sphinx-build -b gettext . ../"
- name: Configure git
run: git config --global user.name "Github Action" && git config --global user.email '<>'

# Install gettext
- name: Install gettext
run: sudo apt install gettext

# Update the .po files with the new .pot file using msgmerge
- name: Run msgmerge
run: find locales -type f -path '*/LC_MESSAGES/*.po' -execdir msgmerge -U {} index.pot --backup=off \;

# Commit changes
run: find locales -regex ".*index\.po$" | xargs -I "{}" msgmerge -U {} index.pot --backup=off
- name: Commit changes
run: git commit -a -m "Updated doc strings" || echo "No changes"

# Push changes
- name: Push changes
run: git push

0 comments on commit 91d9e28

Please sign in to comment.