Skip to content

Commit

Permalink
first shot
Browse files Browse the repository at this point in the history
  • Loading branch information
daringer committed Nov 23, 2024
1 parent 847185e commit d786596
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 1 deletion.
62 changes: 62 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: build
on:
push:
branches: [ main ]

jobs:
install-tools:
runs-on: ubuntu-latest
container:
image: sphinxdoc/sphinx
# #volumes:
# # - ${{ github.workspace }}/:/docs
volumes:
- /home/dariball/dev/nitrokey-documentation/result:/result
defaults:
run:
working-directory: ${{ github.workspace }}
env:
MAIN_LANGS: en de
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
steps:
- name: Checkout
uses: actions/checkout@v2
#- name: check if container runs
# run: ls /
#- name: more stuff
# run: echo "whooot" ${{ github.workspace }}
#- name: show docs
# run: ls -la /docs
#- name: show workspace
# run: ls -la ${{ github.workspace }}
- name: additional sphinx install
run: pip3 install -r requirements.txt

#- name: build workspace
# run: |
# mkdir /work

- name: build pot files
run: sphinx-build -b gettext source locales/

- name: build po files from pot files
shell: bash
run: |
lang=($MAIN_LANGS $OTHER_LANGS)
sphinx-intl update -p locales/ ${lang[@]/*/'-l '&' '}
- name: build docs
run: |
cp -r locales source
for lang in $MAIN_LANGS $OTHER_LANGS
do
mkdir -p dist/$lang
mkdir -p build/$lang/doctrees
sphinx-build -j auto -b html -D language=$lang -d build/$lang/doctrees source dist/$lang
done
- name: copy generated
run: |
cp -r dist locales build /result
# bash
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ soupsieve==2.4.1
Sphinx==6.2.1
sphinx-basic-ng==1.0.0b1
sphinx-copybutton==0.5.2
sphinx-intl==2.2.0
sphinx-intl==2.3.0
sphinx-tabs==3.4.1
sphinxcontrib-applehelp==1.0.4
sphinxcontrib-devhelp==1.0.2
Expand Down

0 comments on commit d786596

Please sign in to comment.