Skip to content

Create Website for pySDC #211

Create Website for pySDC

Create Website for pySDC #211

Workflow file for this run

---
name: Create Website for pySDC
on:
workflow_run:
workflows: ["Mirror to Gitlab to trigger CI"]
types: ["completed"]
jobs:
build_website:
runs-on: ubuntu-latest
if: >-
${{ github.repository_owner == 'Parallel-in-Time'
&& github.event.workflow_run.conclusion == 'success' }}
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Conda environment with Micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: "etc/environment-postprocess.yml"
- name: Downloading artifacts
uses: actions/download-artifact@v4
with:
path: .
merge-multiple: true
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.ACTION_READ_TOKEN }}
- name: Prepare artifacts
run: |
python -m coverage combine coverage_*.dat
python -m coverage xml
python -m coverage html
- name: Generate Coverage badge
run: |
genbadge coverage -i coverage.xml -o htmlcov/coverage-badge.svg
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV }}
# - name: Generate benchmark report
# uses: pancetta/github-action-benchmark@v1
# if: ${{ (!contains(github.event.head_commit.message, '[CI-no-benchmarks]')) && (github.event_name == 'push') }}
# with:
# name: pySDC Benchmark with pytest-benchmark
# tool: 'pytest'
# output-file-path: benchmarks/output.json
# auto-push: false
# skip-fetch-gh-pages: true
# benchmark-data-dir-path: bench/${{ github.head_ref || github.ref_name }}
# github-token: ${{ secrets.GITHUB_TOKEN }}
#
# - name: Push benchmark data
# uses: dmnemec/copy_file_to_another_repo_action@main
# if: "!contains(github.event.head_commit.message, '[CI-no-benchmarks]')"
# env:
# API_TOKEN_GITHUB: ${{ secrets.BENCHMARK_BOT }}
# with:
# source_file: 'bench/${{ github.head_ref || github.ref_name }}'
# destination_repo: 'Parallel-in-Time/pySDC-benchmarks'
# user_email: 'sig.pancetta+github@email.com'
# user_name: 'pancetta'
- name: Build html I
run: |
chmod u+x ./docs/update_apidocs.sh
./docs/update_apidocs.sh
sphinx-build -b html docs/source docs/build/html 2>&1 | tee sphinx_build.log
images_not_found=$(grep "WARNING: image file not readable:" < sphinx_build.log | wc -l)
if [ $images_not_found != "0" ] ; then echo "Some linked images were not found"; exit 1 ;fi
mkdir -p docs/build/html/coverage
mv htmlcov/* docs/build/html/coverage/.
- name: Store docs
uses: actions/upload-artifact@v4
with:
name: docs
path: docs/build/html
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
if: >-
${{ github.event.workflow_run.event == 'push'
&& github.repository_owner == 'Parallel-in-Time'
&& github.event.workflow_run.head_branch == 'master' }}
with:
branch: gh-pages # The branch the action should deploy to.
folder: docs/build/html # The folder the action should deploy.