Skip to content

[GHA] Upload an artifact of the converted tutorials for testing #17

[GHA] Upload an artifact of the converted tutorials for testing

[GHA] Upload an artifact of the converted tutorials for testing #17

name: Publish Website Testing
on:
pull_request:
branches: [ main ]
jobs:
build-website:
runs-on: ubuntu-latest
permissions:
contents: write
env:
# `uv pip ...` requires venv by default. This skips that requirement.
UV_SYSTEM_PYTHON: 1
steps:
- uses: actions/checkout@v4
with:
ref: 'docusaurus-versions' # release branch
fetch-depth: 0
- name: Sync release branch with main
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git merge origin/tutorial-conversion-test-artifact # test with changes from this branch
# To avoid a large number of commits we don't push this sync commit to github until a new release.
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
uv pip install -e ".[tutorial]"
- if: ${{ inputs.run_tutorials }}
name: Run Tutorials
run: |
python scripts/run_tutorials.py -w $(pwd)
- name: Build website
run: |
bash scripts/make_docs.sh -b
- name: Setup tmate session
if: failure()
uses: mxschmitt/action-tmate@v3