Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Added new workflow which can deploy the documentation to GitHub Pages #76

Merged
merged 1 commit into from
Oct 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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