-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc(python): Publish documentation on GitHub pages (#412)
--------- Co-authored-by: Kalan <[email protected]>
- Loading branch information
Showing
13 changed files
with
377 additions
and
113 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
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: Install poetry | ||
uses: snok/install-poetry@v1 | ||
- 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 | ||
|
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
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.