Skip to content

Commit 8101ed8

Browse files
committed
try-out
1 parent d786596 commit 8101ed8

File tree

1 file changed

+60
-25
lines changed

1 file changed

+60
-25
lines changed

.github/workflows/build.yml

Lines changed: 60 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,97 @@
11
name: build
22
on:
33
push:
4-
branches: [ main ]
4+
branches: [ main, develop, gh-build ]
5+
6+
concurrency:
7+
group: ${{ github.ref }}
8+
cancel-in-progress: true
59

610
jobs:
7-
install-tools:
11+
full-build:
812
runs-on: ubuntu-latest
913
container:
1014
image: sphinxdoc/sphinx
11-
# #volumes:
12-
# # - ${{ github.workspace }}/:/docs
1315
volumes:
1416
- /home/dariball/dev/nitrokey-documentation/result:/result
1517
defaults:
1618
run:
1719
working-directory: ${{ github.workspace }}
1820
env:
19-
MAIN_LANGS: en de
20-
OTHER_LANGS: es fr ru nl it ja el bg da et fi lv lt pl pt ro sv sk sl cs hu zh_CN
21+
MAIN_LANGS: en
22+
OTHER_LANGS: de es fr ru nl it ja el bg da et fi lv lt pl pt ro sv sk sl cs hu zh_CN
23+
2124
steps:
2225
- name: Checkout
2326
uses: actions/checkout@v2
24-
#- name: check if container runs
25-
# run: ls /
26-
#- name: more stuff
27-
# run: echo "whooot" ${{ github.workspace }}
28-
#- name: show docs
29-
# run: ls -la /docs
30-
#- name: show workspace
31-
# run: ls -la ${{ github.workspace }}
27+
3228
- name: additional sphinx install
3329
run: pip3 install -r requirements.txt
3430

35-
#- name: build workspace
36-
# run: |
37-
# mkdir /work
38-
31+
- name: quick build docs
32+
run: |
33+
mkdir -p dist/en
34+
mkdir -p build/en/doctrees
35+
sphinx-build -j auto -b html -D language=en -d build/en/doctrees source dist/en
36+
37+
- name: LOCAL ONLY - copy generated
38+
run: cp -r dist /result/quick
39+
40+
- name: upload quick build artifact
41+
uses: actions/upload-artifact@v4
42+
with:
43+
name: generated documentation (en)
44+
path: dist
45+
46+
- name: TODO - trigger script on server to download artifact
47+
run: echo "placeholder"
48+
3949
- name: build pot files
4050
run: sphinx-build -b gettext source locales/
4151

4252
- name: build po files from pot files
4353
shell: bash
4454
run: |
45-
lang=($MAIN_LANGS $OTHER_LANGS)
55+
lang=($OTHER_LANGS)
4656
sphinx-intl update -p locales/ ${lang[@]/*/'-l '&' '}
4757
48-
- name: build docs
58+
- name: prepare commit into self
59+
run: |
60+
cp -r locales locales.full
61+
rm -rf locales/.doctrees
62+
63+
- name: TODO - commit locales into repository
64+
run: echo "commit it"
65+
66+
- name: put original locales back
67+
run: |
68+
rm -rf locales
69+
cp -r locales.full locales
70+
71+
- name: TODO - weblate
4972
run: |
50-
cp -r locales source
73+
echo "trigger pull"
74+
echo "trigger deepl"
75+
echo "trigger commit"
76+
echo "trigger push"
77+
78+
- name: build full docs
79+
run: |
80+
cp -r locales source/locales
5181
for lang in $MAIN_LANGS $OTHER_LANGS
5282
do
5383
mkdir -p dist/$lang
5484
mkdir -p build/$lang/doctrees
5585
sphinx-build -j auto -b html -D language=$lang -d build/$lang/doctrees source dist/$lang
5686
done
5787
88+
- name: LOCAL - copy generated
89+
run: cp -r dist locales build /result
90+
91+
- name: upload artifact
92+
uses: actions/upload-artifact@v4
93+
with:
94+
name: generated documentation (all)
95+
path: dist
5896

59-
- name: copy generated
60-
run: |
61-
cp -r dist locales build /result
62-
# bash
97+

0 commit comments

Comments
 (0)