Better integration of sphinx gallery #43
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: Build | |
on: [push, pull_request] | |
jobs: | |
conda-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniforge-version: latest | |
- name: Build | |
shell: bash -l {0} | |
run: | | |
conda install -y openturns numpy pytest numpydoc sphinx sphinx-gallery sphinx_rtd_theme pandoc flake8 matplotlib | |
flake8 --max-line-length=120 | |
python setup.py install | |
pytest | |
sudo apt install -y texlive-latex-recommended texlive-fonts-recommended texlive-latex-extra | |
make html -C doc | |
- name: Upload | |
if: ${{ github.ref == 'refs/heads/master' }} | |
run: | | |
git clone --depth 1 https://${{ secrets.GH_TOKEN }}@github.com/sofianehaddad/sofianehaddad.github.io.git /tmp/io | |
mkdir -p /tmp/io/sphinx/ottemplate/master | |
cp -r doc/_build/html/* /tmp/io/sphinx/ottemplate/master | |
cd /tmp/io | |
touch .nojekyll | |
git config user.email "support@gh.com" | |
git config user.name "GitHub Actions" | |
git add -A . | |
if test `git diff HEAD | wc -c` -eq 0; then exit 0; fi | |
git commit -a -m "GitHub Actions build ${GITHUB_REPOSITORY} ${GITHUB_RUN_ID}" | |
git push --quiet origin main > /dev/null 2>&1 |