Skip to content

Commit

Permalink
docs: Added new workflow which can deploy the documentation to GitHub…
Browse files Browse the repository at this point in the history
… Pages

	new file:   .github/workflows/deploy-documentation.yml
	modified:   README.rst
	modified:   pyproject.toml

Signed-off-by: qthompso <[email protected]>
  • Loading branch information
qthompso committed Oct 28, 2023
1 parent 09e9e6e commit c61b928
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 4 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/deploy-documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: Deploy Docs to Github Pages
on:
workflow_run:
branches: [main]
workflows: [Test docs]
types: [completed]
concurrency:
group: publish-docs
jobs:
publish-docs:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }} && github.ref ==
'refs/heads/main'
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Download Artifact
uses: dawidd6/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
run_id: ${{ github.event.workflow_run.id }}
workflow_conclusion: success
name: artifact_docs
- name: Unzip Documentation Results
run: |
unzip docs_results.zip
rm -r docs_results/.results_docs/html/.doctrees
- name: Upload To Pages
uses: actions/upload-pages-artifact@v2
with:
path: docs_results/.results_docs/html
- name: Deploy To Pages
uses: actions/deploy-pages@v2
id: deployment
9 changes: 6 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* - Package
- |PyPI: Package status| |PyPI: Latest release version| |PyPI: Supported Python versions| |PyPI: Downloads| |License: Apache 2.0| |Package build status| |PyPI upload status| |TestPyPI upload status|
* - Documentation
- |Documentation status|
- |GitHub Pages status|
* - Code Style
- |Test style: pytest| |Code style: black| |Imports: isort| |Docstring style: google|
* - Linting
Expand Down Expand Up @@ -55,9 +55,12 @@
.. |pre-commit status| image:: https://results.pre-commit.ci/badge/github/tektronix/tm_devices/main.svg
:target: https://results.pre-commit.ci/latest/github/tektronix/tm_devices/main

.. |Documentation status| image:: https://readthedocs.org/projects/tm-devices/badge/?version=latest
.. |ReadTheDocs status| image:: https://readthedocs.org/projects/tm-devices/badge/?version=latest
:target: https://tm-devices.readthedocs.io/en/latest/?badge=latest

.. |GitHub Pages status| image:: https://github.com/tektronix/tm_devices/actions/workflows/deploy-documentation.yml/badge.svg?branch=main
:target: https://github.com/tektronix/tm_devices/actions/workflows/deploy-documentation.yml

.. |License: Apache 2.0| image:: https://img.shields.io/pypi/l/tm_devices
:target: https://tinyurl.com/tek-tm-devices/LICENSE.md

Expand Down Expand Up @@ -257,7 +260,7 @@ Supported Connections
Documentation
-------------

See the full documentation at `<https://tm-devices.readthedocs.io>`__
See the full documentation at `<https://tektronix.github.io/tm_devices/>`__

Maintainers
-----------
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ classifiers = [
"Programming Language :: Python :: 3.12" # TODO: remove this once poetry automatically adds it
]
description = "Manage connections and interactions with Test & Measurement devices."
documentation = "https://tm-devices.readthedocs.io/en/latest/"
documentation = "https://tektronix.github.io/tm_devices/"
homepage = "https://pypi.org/project/tm_devices/"
keywords = [
"REST API",
Expand Down

0 comments on commit c61b928

Please sign in to comment.