summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorrebortg <github@ghlr.de>2023-06-30 21:02:58 +0200
committerrebortg <github@ghlr.de>2023-06-30 22:00:13 +0200
commit540db56694da9f0f17ae7a5647e8dd7d96c0fd73 (patch)
treeb2e78c0202fd257bb216be31523a03d3ebe156c7 /.github/workflows
parent84f5f7372511289821cd3cf8366f0c6a92ad4196 (diff)
downloadvyos-documentation-540db56694da9f0f17ae7a5647e8dd7d96c0fd73.tar.gz
vyos-documentation-540db56694da9f0f17ae7a5647e8dd7d96c0fd73.zip
add localazy as the translation provider
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/main.yml5
-rw-r--r--.github/workflows/submodules.yml1
-rw-r--r--.github/workflows/update-translations.yml58
3 files changed, 59 insertions, 5 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index eb04d97f..67556017 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -13,11 +13,6 @@ jobs:
id: file_changes
uses: trilom/file-changes-action@v1.2.3
- #- name: Vale
- # uses: errata-ai/vale-action@v1.3.0
- # with:
- # files: '${{ steps.file_changes.outputs.files_modified }}'
-
- name: Set up Python
uses: actions/setup-python@v2
with:
diff --git a/.github/workflows/submodules.yml b/.github/workflows/submodules.yml
index 3adcba8d..9959825d 100644
--- a/.github/workflows/submodules.yml
+++ b/.github/workflows/submodules.yml
@@ -11,6 +11,7 @@ jobs:
- uses: actions/checkout@v2
with:
repository: ${{ github.repository }}
+
- name: update submodule
run: |
git submodule status
diff --git a/.github/workflows/update-translations.yml b/.github/workflows/update-translations.yml
new file mode 100644
index 00000000..1273693f
--- /dev/null
+++ b/.github/workflows/update-translations.yml
@@ -0,0 +1,58 @@
+name: "translation: generate, upload, download"
+on:
+ workflow_dispatch:
+
+jobs:
+ main:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout Repo
+ uses: actions/checkout@v3
+
+ - name: Set Up Python
+ uses: actions/setup-python@v2
+ with:
+ python-version: 3.x
+
+ - name: Install Dev Dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install -r requirements.txt
+
+ - name: Build Documentation
+ run: |
+ cd docs
+ make gettext
+ cd ..
+
+ - name: upload pot files
+ uses: localazy/upload@v1
+ with:
+ read_key: ${{ secrets.LOCALAZY_READ_KEY }}
+ write_key: ${{ secrets.LOCALAZY_WRITE_KEY }}
+
+ - name: download translation files
+ uses: localazy/download@v1
+ with:
+ read_key: ${{ secrets.LOCALAZY_READ_KEY }}
+ write_key: ${{ secrets.LOCALAZY_WRITE_KEY }}
+
+ - name: set file ownership
+ run: |
+ sudo chown -R 1001 docs/_locale
+ ls -l docs/_locale/de
+
+
+ - name: Create Pull Request
+ uses: peter-evans/create-pull-request@v3
+ with:
+ token: ${{secrets.GITHUB_TOKEN}}
+ add-paths: docs/_locale/*
+ commit-message: "Github: update translations"
+ committer: GitHub <noreply@github.com>
+ author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
+ title: "Github: update translations"
+ body: |
+ Generate, upload new and download translation files
+ branch: update-translations-master
+ delete-branch: true \ No newline at end of file