Skip to content

Commit 0c3e0ba

Browse files
committed
Move the workflow for generating the wiki pages to the webpage branch
1 parent 0c59b3f commit 0c3e0ba

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Generate Wiki Pages from XML
2+
on:
3+
workflow_dispatch:
4+
push:
5+
paths:
6+
- 'translations/*.xml'
7+
branches:
8+
- webpage
9+
jobs:
10+
generate-wiki:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout 'webpage' branch
14+
uses: actions/checkout@v4
15+
with:
16+
ref: webpage
17+
- name: Set up Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: 3.x
21+
- name: Run Python script to generate markdown
22+
run: |
23+
python3 generate_wiki_pages_from_xml.py \
24+
--xml-dir=translations \
25+
--output-dir=wiki/synchronization \
26+
--strings=synchronization_between_computers_title,synchronization_intro,set_up_first_pc,set_up_second_pc,bidirectional_sync,synchronization_files
27+
- name: Commit and push changes to 'webpage' branch
28+
run: |
29+
git config --global user.name "github-actions[bot]"
30+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
31+
git add wiki/synchronization/*.md
32+
git commit -m "Update wiki markdown from XML translations" || echo "No changes to commit"
33+
git push origin webpage

0 commit comments

Comments
 (0)