Reworked PublishToGitHubPages.

This commit is contained in:
Patrick Lehmann
2025-09-10 08:06:28 +02:00
parent 57f88b158f
commit d1d591efb8
7 changed files with 133 additions and 59 deletions

View File

@@ -5,102 +5,171 @@ PublishToGitHubPages
This job publishes HTML content from artifacts of other jobs to GitHub Pages. This job publishes HTML content from artifacts of other jobs to GitHub Pages.
**Behavior:** .. topic:: Features
1. Checkout repository. tbd
2. Download artifacts.
3. Push HTML files to branch ``gh-pages``.
**Dependencies:**
* :gh:`actions/checkout` .. topic:: Behavior
* :gh:`actions/download-artifact`
1. Checkout repository.
2. Download artifacts.
3. Push HTML files to branch ``gh-pages``.
.. topic:: Job Execution
.. image:: ../../_static/pyTooling-Actions-PublishToGitHubPages.png
:width: 500px
.. topic:: Dependencies
* :gh:`actions/checkout`
* :gh:`pyTooling/download-artifact`
* :gh:`actions/download-artifact`
.. _JOBTMPL/Parameters/Instantiation:
Instantiation Instantiation
************* *************
Simple Example .. grid:: 2
==============
.. code-block:: yaml .. grid-item::
:columns: 5
jobs: .. rubric:: Simple Example
BuildTheDocs:
# ...
PublishToGitHubPages: .. code-block:: yaml
uses: pyTooling/Actions/.github/workflows/PublishToGitHubPages.yml@r5
needs: jobs:
- BuildTheDocs BuildTheDocs:
with: # ...
doc: Documentation
PublishToGitHubPages:
uses: pyTooling/Actions/.github/workflows/PublishToGitHubPages.yml@r5
needs:
- BuildTheDocs
with:
doc: Documentation
.. grid-item::
:columns: 5
.. rubric:: Complex Example
.. code-block:: yaml
jobs:
PublishToGitHubPages:
uses: pyTooling/Actions/.github/workflows/PublishToGitHubPages.yml@r5
needs:
- Params
- BuildTheDocs
- Coverage
- StaticTypeCheck
with:
doc: ${{ fromJson(needs.Params.outputs.artifact_names).documentation_html }}
coverage: ${{ fromJson(needs.Params.outputs.artifact_names).codecoverage_html }}
typing: ${{ fromJson(needs.Params.outputs.artifact_names).statictyping_html }}
Complex Example .. _JOBTMPL/PublishToGitHubPages/Parameters:
===============
.. code-block:: yaml Parameter Summary
*****************
jobs: .. rubric:: Goto :ref:`input parameters <JOBTMPL/PublishToGitHubPages/Inputs>`
PublishToGitHubPages:
uses: pyTooling/Actions/.github/workflows/PublishToGitHubPages.yml@r5 +---------------------------------------------------------------------+----------+----------+-------------------------------------------------------------------+
needs: | Parameter Name | Required | Type | Default |
- Params +=====================================================================+==========+==========+===================================================================+
- BuildTheDocs | :ref:`JOBTMPL/PublishToGitHubPages/Input/ubuntu_image_version` | no | string | ``'24.04'`` |
- Coverage +---------------------------------------------------------------------+----------+----------+-------------------------------------------------------------------+
- StaticTypeCheck | :ref:`JOBTMPL/PublishToGitHubPages/Input/doc` | yes | string | — — — — |
with: +---------------------------------------------------------------------+----------+----------+-------------------------------------------------------------------+
doc: ${{ fromJson(needs.Params.outputs.artifact_names).documentation_html }} | :ref:`JOBTMPL/PublishToGitHubPages/Input/coverage` | no | string | ``''`` |
coverage: ${{ fromJson(needs.Params.outputs.artifact_names).codecoverage_html }} +---------------------------------------------------------------------+----------+----------+-------------------------------------------------------------------+
typing: ${{ fromJson(needs.Params.outputs.artifact_names).statictyping_html }} | :ref:`JOBTMPL/PublishToGitHubPages/Input/typing` | no | string | ``''`` |
+---------------------------------------------------------------------+----------+----------+-------------------------------------------------------------------+
.. rubric:: Goto :ref:`secrets <JOBTMPL/PublishToGitHubPages/Secrets>`
This job template needs no secrets.
.. rubric:: Goto :ref:`output parameters <JOBTMPL/PublishToGitHubPages/Outputs>`
This job template has no output parameters.
Parameters .. _JOBTMPL/PublishToGitHubPages/Inputs:
**********
Input Parameters
****************
.. _JOBTMPL/PublishToGitHubPages/Input/ubuntu_image_version:
.. include:: ../_ubuntu_image_version.rst
.. _JOBTMPL/PublishToGitHubPages/Input/doc:
doc doc
=== ===
+----------------+----------+----------+--------------+ :Type: string
| Parameter Name | Required | Type | Default | :Required: yes
+================+==========+==========+==============+ :Default Value: — — — —
| doc | yes | string | — — — — | :Possible Values: Any valid artifact name.
+----------------+----------+----------+--------------+ :Description: Name of the documentation artifact containing the HTML website.
Name of the documentation artifact.
.. _JOBTMPL/PublishToGitHubPages/Input/coverage:
coverage coverage
======== ========
+----------------+----------+----------+-----------------+ :Type: string
| Parameter Name | Required | Type | Default | :Required: no
+================+==========+==========+=================+ :Default Value: ``''``
| coverage | optional | string | ``""`` | :Possible Values: Any valid artifact name.
+----------------+----------+----------+-----------------+ :Description: Name of the coverage artifact containing the HTML coverage report, which will be integrated as a
subdirectory.
Name of the coverage artifact.
.. _JOBTMPL/PublishToGitHubPages/Input/typing:
typing typing
====== ======
+----------------+----------+----------+-----------------+ :Type: string
| Parameter Name | Required | Type | Default | :Required: no
+================+==========+==========+=================+ :Default Value: ``''``
| typing | optional | string | ``""`` | :Possible Values: Any valid artifact name.
+----------------+----------+----------+-----------------+ :Description: Name of the type checking artifact containing the HTML type checker report, which will be integrated
as a subdirectory.
Name of the typing artifact.
.. _JOBTMPL/PublishToGitHubPages/Secrets:
Secrets Secrets
******* *******
This job template needs no secrets. This job template needs no secrets.
Results
.. _JOBTMPL/PublishToGitHubPages/Outputs:
Outputs
******* *******
This job template has no output parameters. This job template has no output parameters.
.. _JOBTMPL/PublishToGitHubPages/Optimizations:
Optimizations
*************
This template offers no optimizations (reduced job runtime).

View File

@@ -143,6 +143,7 @@ artifact
:Type: string :Type: string
:Required: yes :Required: yes
:Default Value: — — — —
:Possible Values: Any valid artifact name. :Possible Values: Any valid artifact name.
:Description: Name of the artifact containing the packaged Python code. :Description: Name of the artifact containing the packaged Python code.

View File

@@ -168,6 +168,7 @@ artifact
:Type: string :Type: string
:Required: yes :Required: yes
:Default Value: — — — —
:Possible Values: Any valid artifact name. :Possible Values: Any valid artifact name.
:Description: Name of the artifact containing the packaged Python package(s). :Description: Name of the artifact containing the packaged Python package(s).

View File

@@ -5,8 +5,8 @@ Publish
The category *publish* provides workflow templates implementing The category *publish* provides workflow templates implementing
* :ref:`JOBTMPL/PublishTestResults` - * :ref:`JOBTMPL/PublishTestResults`- Merge and publish unit test results.
* :ref:`JOBTMPL/PublishCoverageResults` - * :ref:`JOBTMPL/PublishCoverageResults` - Merge and publish code coverage results.
.. toctree:: .. toctree::
:hidden: :hidden:

View File

@@ -142,6 +142,7 @@ version
:Type: string :Type: string
:Required: yes :Required: yes
:Default Value: — — — —
:Possible Values: Any valid Git tag name. :Possible Values: Any valid Git tag name.
:Description: The version string to be used for tagging. :Description: The version string to be used for tagging.
@@ -153,6 +154,7 @@ auto_tag
:Type: string :Type: string
:Required: yes :Required: yes
:Default Value: — — — —
:Possible Values: ``'false'``, ``'true'``` :Possible Values: ``'false'``, ``'true'```
:Description: If *true*, tag the current commit. :Description: If *true*, tag the current commit.

View File

@@ -19,10 +19,11 @@
.. rubric:: Documentation .. rubric:: Documentation
* :ref:`JOBTMPL/CheckDocumentation` * :ref:`JOBTMPL/CheckDocumentation`
* :ref:`JOBTMPL/VerifyDocs`
* :ref:`JOBTMPL/SphinxDocumentation` * :ref:`JOBTMPL/SphinxDocumentation`
* :ref:`JOBTMPL/LaTeXDocumentation` * :ref:`JOBTMPL/LaTeXDocumentation`
.. #* :ref:`JOBTMPL/VerifyDocs`
.. rubric:: Unit Tests, Code Coverage .. rubric:: Unit Tests, Code Coverage
* :ref:`JOBTMPL/ApplicationTesting` * :ref:`JOBTMPL/ApplicationTesting`

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB