Skip to content

Commit

Permalink
DevOps: Fix the post-release workflow to upload to transifex (#5741)
Browse files Browse the repository at this point in the history
  • Loading branch information
unkcpz authored Nov 4, 2022
1 parent ef91d38 commit d1a97a1
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/post-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,32 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Set up Python 3.8
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: '3.8'
python-version: '3.10'

- name: Install python dependencies
run: |
pip install --upgrade pip
pip install transifex-client sphinx-intl
pip install -e .[docs,tests,rest,atomic_tools]
pip install -U -e .[docs,tests,rest,atomic_tools]
- name: Build pot files
env:
READTHEDOCS: 'True'
RUN_APIDOC: 'False'
RUN_APIDOC: 'True'
run:
sphinx-build -b gettext docs/source locale
make -C docs gettext

- name: Setting transifex configuration and upload pot files
env:
PROJECT_NAME: aiida-core
USER: ${{ secrets.TRANSIFEX_USER }}
PASSWD: ${{ secrets.TRANSIFEX_PASSWORD }}
run: |
tx init --no-interactive
sphinx-intl update-txconfig-resources --pot-dir locale --transifex-project-name ${PROJECT_NAME}
sphinx-intl create-txconfig
sphinx-intl update-txconfig-resources --pot-dir docs/build/locale --transifex-project-name ${PROJECT_NAME}
echo $'[https://www.transifex.com]\nhostname = https://www.transifex.com\nusername = '"${USER}"$'\npassword = '"${PASSWD}"$'\n' > ~/.transifexrc
tx push -s
- name: Push to transifex
run: |
tx push -t -s
13 changes: 13 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,19 @@

myst_enable_extensions = ['colon_fence', 'deflist']
nb_merge_streams = True
nb_render_priority = {
'gettext': (
'application/vnd.jupyter.widget-view+json',
'application/javascript',
'text/html',
'image/svg+xml',
'image/png',
'image/jpeg',
'text/markdown',
'text/latex',
'text/plain',
)
}

# -- Options for HTML output ---------------------------------------------------

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ docs = [
"sphinx-notfound-page~=0.5",
"sphinxext-rediraffe~=0.2.4",
"sphinx-sqlalchemy~=0.1.1",
"sphinx-intl[transifex]~=2.0.1",
"myst-nb~=0.13.2"
]
atomic_tools = [
Expand Down
1 change: 1 addition & 0 deletions requirements/requirements-py-3.10.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ spglib==1.16.1
sphinx==4.4.0
sphinx-copybutton==0.5.0
sphinx-design==0.0.13
sphinx-intl==2.0.1
sphinx-notfound-page==0.8
sphinx-sqlalchemy==0.1.1
sphinxcontrib-applehelp==1.0.2
Expand Down
1 change: 1 addition & 0 deletions requirements/requirements-py-3.8.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ spglib==1.16.1
sphinx==4.4.0
sphinx-copybutton==0.5.0
sphinx-design==0.0.13
sphinx-intl==2.0.1
sphinx-notfound-page==0.8
sphinx-sqlalchemy==0.1.1
sphinxcontrib-applehelp==1.0.2
Expand Down
1 change: 1 addition & 0 deletions requirements/requirements-py-3.9.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ spglib==1.16.1
sphinx==4.4.0
sphinx-copybutton==0.5.0
sphinx-design==0.0.13
sphinx-intl==2.0.1
sphinx-notfound-page==0.8
sphinx-sqlalchemy==0.1.1
sphinxcontrib-applehelp==1.0.2
Expand Down

0 comments on commit d1a97a1

Please sign in to comment.