Skip to content

pyvista-tutorial-auto-update #1010

pyvista-tutorial-auto-update

pyvista-tutorial-auto-update #1010

Workflow file for this run

name: pyvista-tutorial-auto-update
on:
schedule:
- cron: "0 0 * * *"
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
submodules: true
- name: Setup SSH
uses: MrSquaare/ssh-setup-action@v3
with:
host: github.com
private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: install
run: |
git submodule update --remote
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
pip install -r ./requirements.txt
pip install -r pyvista-tutorial/requirements_docs.txt
curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash
mv tx /usr/local/bin/tx
- name: update
env:
SPHINXINTL_TRANSIFEX_ORGANIZATION_NAME: tkoyama010
SPHINXINTL_TRANSIFEX_USERNAME: api
SPHINXINTL_TRANSIFEX_PROJECT_NAME: pyvista-tutorial
TX_TOKEN: ${{ secrets.TX_TOKEN }}
run: |
set -x
git submodule update --remote
export DISPLAY=:99.0
export PYVISTA_OFF_SCREEN=True
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
sleep 3
set +x
rm -f ./locale/source/tutorial/*/*.py
mv ./locale/source/tutorial ./pyvista-tutorial/doc/source
cd pyvista-tutorial
make -C doc html SPHINXOPTS="-w build_errors.txt -N"
cd ../
cp ./pyvista-tutorial/doc/*.vtk ./locale
sh ./locale/update.sh
ls ./pyvista-tutorial/doc/source/tutorial
mv ./pyvista-tutorial/doc/source/tutorial ./locale/source
- name: commit
if: contains(github.event.head_commit.message, '[ci skip]') == false && contains(github.ref, 'main')
env:
JOB_ID: ${{ steps.jobs.outputs.job_id }}
HTML_URL: ${{ steps.jobs.outputs.html_url }}
run: |
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 remote -v
git remote add github [email protected]:$GITHUB_REPOSITORY.git
git push github main