This repository has been archived by the owner on Feb 22, 2024. It is now read-only.
New Crowdin updates #12363
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Staging translated Qiskit docs | |
on: | |
pull_request: | |
branches: [ main ] | |
label: | |
types: [ gh-pages-main ] | |
jobs: | |
build_docs: | |
runs-on: ubuntu-latest | |
if: contains( github.event.pull_request.labels.*.name, 'gh-pages-main' ) | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -U virtualenv 'setuptools<61.0.0' wheel | |
pip install -U -r requirements-dev.txt sphinx-intl qiskit | |
pip install -c constraints.txt -U jupyter sphinx nbsphinx networkx sphinx_rtd_theme qiskit-terra[visualization] cvxpy 'pyscf<1.7.4' | |
pip install -c constraints.txt -U . | |
sudo apt-get install graphviz pandoc | |
- name: Build translated Qiskit Docs | |
env: | |
TRANSLATION_LANG: ${{ matrix.language }} | |
run: | | |
tools/staging_translated_documentation.sh | |
- name: Compress artifact | |
run: | | |
mkdir artifacts | |
cp -R build/locale/* build/ | |
rm -r build/locale | |
tar -zcvf translated_docs_${{matrix.language}}.tar.gz build/ | |
mv translated_docs_${{matrix.language}}.tar.gz artifacts/. | |
- name: Upload artifact | |
uses: actions/upload-artifact@main | |
with: | |
name: qiskit-translated-docs | |
path: artifacts | |
strategy: | |
matrix: | |
language: | |
- bn_BN | |
# - de_DE | |
- es_UN | |
- fr_FR | |
- hi_IN | |
- ja_JP | |
- ko_KR | |
# - mr_IN | |
# - pl_PL | |
- pt_UN | |
# - ru_RU | |
- ta_IN | |
# - th_TH | |
- tr_TR | |
- zh_CN | |
- zh_TW | |
deploy_docs: | |
runs-on: ubuntu-latest | |
needs: build_docs | |
steps: | |
- uses: actions/checkout@main | |
- name: Download artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: qiskit-translated-docs | |
- name: Decompress artifact | |
run: | | |
for f in *.tar.gz; do tar -xvf "$f"; done | |
- name: Push directory to another repository | |
uses: cpina/github-action-push-to-another-repository@main | |
env: | |
API_TOKEN_GITHUB: ${{ secrets.STAGING_REPO }} | |
with: | |
source-directory: 'build' | |
destination-github-username: 'qiskit-community' | |
destination-repository-name: 'qiskit-translations-staging' | |
target-directory: 'docs' | |
user-name: SooluThomas | |
user-email: [email protected] | |
target-branch: main | |
commit-message: Qiskit Autodeploy ORIGIN_COMMIT from $GITHUB_REF |