Skip to content

pyvista-doc-tutorial-update #977

pyvista-doc-tutorial-update

pyvista-doc-tutorial-update #977

Workflow file for this run

name: pyvista-doc-tutorial-update
on:
schedule:
- cron: "0 1 * * *"
push:
branches:
- main
pull_request:
branches:
- main
jobs:
script:
runs-on: ubuntu-20.04
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Get Job URL
uses: Tiryoh/gha-jobid-action@v1
id: jobs
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
job_name: script
- name: Checkout with submodule
uses: actions/checkout@v4
with:
fetch-depth: 0
repository: pyvista/pyvista-tutorial-translations
submodules: true
path: pyvista-tutorial-translations
- name: Checkout other repo
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: "gh-pages"
path: pyvista-tutorial-ja
- name: Setup SSH
uses: MrSquaare/ssh-setup-action@v3
with:
host: github.com
private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: install
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends python3-setuptools
sudo apt-get install -y --no-install-recommends libgl1-mesa-dev xvfb ffmpeg
sudo apt-get install -y --no-install-recommends python3-venv
sudo apt-get install -y --no-install-recommends libgl1-mesa-glx
sudo apt-get install -y --no-install-recommends python3-tk pandoc
sudo apt-get install -y --no-install-recommends libgeos-dev
pip install -U pip setuptools wheel
cd pyvista-tutorial-translations
git submodule update --remote
pip install -r ./requirements.txt
pip install -e pyvista-tutorial[docs]
cd ../
- name: build
env:
JOB_ID: ${{ steps.jobs.outputs.job_id }}
HTML_URL: ${{ steps.jobs.outputs.html_url }}
run: |
cd pyvista-tutorial-translations
set -x
export DISPLAY=:99.0
export PYVISTA_OFF_SCREEN=True
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
sleep 3
set +x
git submodule update --remote
cd pyvista-tutorial
make -C doc html SPHINXOPTS="-w build_errors.txt -N -D language=ja -D locale_dirs='../../../locale'"
cd ../
cd ../
- name: commit
if: contains(github.ref, 'main')
env:
JOB_ID: ${{ steps.jobs.outputs.job_id }}
HTML_URL: ${{ steps.jobs.outputs.html_url }}
run: |
cd pyvista-tutorial-ja
git checkout gh-pages
git rm -rf *
mv ../pyvista-tutorial-translations/pyvista-tutorial/doc/build/html/* .
touch .nojekyll
git config --global user.email $GITHUB_REPOSITORY
git config --global user.name $GITHUB_REPOSITORY
git add .
git commit --allow-empty -m "[ci skip] $JOB_ID
$HTML_URL"
git push origin gh-pages
cd ../