Skip to content

feat!: Make Python bindings public #554

feat!: Make Python bindings public

feat!: Make Python bindings public #554

Workflow file for this run

name: Publish qcs-sdk-python documentation
on:
push:
branches:
- main
pull_request:
types:
- opened
- reopened
- synchronize
- closed
jobs:
publish-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Create virtual environment
run: python -m venv venv
- name: Activate virtual environment
run: echo "source venv/bin/activate" >> $GITHUB_ENV
- uses: Swatinem/rust-cache@v2
- name: Install cargo-make
uses: actions-rs/cargo@v1
with:
command: install
args: --debug cargo-make
- name: Build qcs-sdk-python documentation
uses: actions-rs/cargo@v1
with:
command: make
args: --cwd crates/python --makefile Makefile.toml docs
- name: Deploy preview
if: ${{ github.event_name == 'pull_request' }}
uses: rossjrw/pr-preview-action@v1
with:
source-dir: crates/python/build/docs
preview-branch: qcs-sdk-python-docs
- name: Deploy docs
if: ${{ github.event_name == 'push' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: crates/python/build/docs
publish_branch: qcs-sdk-python-docs