Skip to content

cadquery-doc-auto-update #1427

cadquery-doc-auto-update

cadquery-doc-auto-update #1427

Workflow file for this run

name: cadquery-doc-auto-update
on:
schedule:
- cron: '0 0 * * *'
push:
branches:
- master
pull_request:
branches:
- master
jobs:
script:
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.7
- 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
cd cadquery
$CONDA/bin/conda update --all
$CONDA/bin/conda env update --file environment.yml --name base
$CONDA/bin/pip install sphinx-intl[transifex]>=2.1.0
cd ../
curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash
mv tx /usr/local/bin/tx
- name: update
env:
SPHINXINTL_TRANSIFEX_USERNAME: api
SPHINXINTL_TRANSIFEX_ORGANIZATION_NAME: tkoyama010
SPHINXINTL_TRANSIFEX_PROJECT_NAME: cadquery-doc
TX_TOKEN: ${{ secrets.TX_TOKEN }}
run: |
(cd cadquery/doc; $CONDA/bin/sphinx-build -M html . _build)
sh ./locale/update.sh
- name: commit
if: contains(github.event.head_commit.message, '[ci skip]') == false && contains(github.ref, 'master')
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 master