-
Notifications
You must be signed in to change notification settings - Fork 49
RHIDP-7202: Doc procs for generating TechDocs pipeline with GitHub Actions and embedding videos #1228
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
base: main
Are you sure you want to change the base?
Conversation
Updated preview: https://redhat-developer.github.io/red-hat-developers-documentation-rhdh/pr-1228/ @ 07/07/25 12:09:10 |
modules/techdocs/proc-techdocs-configure-amazon-s3-storage.adoc
Outdated
Show resolved
Hide resolved
modules/techdocs/proc-techdocs-configure-amazon-s3-storage.adoc
Outdated
Show resolved
Hide resolved
…tions and embedding videos
==== | ||
You can use the newly created access keys to generate a TechDocs pipeline with GitHub Actions. | ||
==== | ||
. From the {ocp-short} web console, click *Topology* > *Actions* > *Restart rollout* to restart the pod. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
. From the {ocp-short} web console, click *Topology* > *Actions* > *Restart rollout* to restart the pod. | |
. To restart the pod, from the {ocp-short} web console, click *Topology > Actions > Restart rollout*. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend leading with orientation and action and then explaining the why, but if you have received guidance that suggests that this format is better, then go for it. Otherwise, consider getting Ingrid's opinion on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, Lindsey! I'll follow leading with orientation and action and the why.
|
||
.Procedure | ||
|
||
. In the section of the TechDocs file that you want to embed a video into, add the following configuration: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
. In the section of the TechDocs file that you want to embed a video into, add the following configuration: | |
. In the section of the TechDocs file that you want to embed a video, add the following configuration: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend leaving "into" as we embed into
* *Publishing the generated documentation site to external object storage*, such as AWS S3, to ensure that the generated documentation persists between restarts of {product-very-short} and can handle larger documentation workloads. | ||
* *Configuring TechDocs in your {product-very-short} deployment to run in read-only mode* so that TechDocs reads the static generated documentation files from the cloud storage bucket without attempting to generate them at runtime. | ||
|
||
You can implement a TechDocs pipeline using GitHub Actions to automatically generate and publish your TechDocs whenever a user in your organization makes a change to a documentation file stored in your GitHub respository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can implement a TechDocs pipeline using GitHub Actions to automatically generate and publish your TechDocs whenever a user in your organization makes a change to a documentation file stored in your GitHub respository. | |
You can implement a TechDocs pipeline using GitHub Actions to automatically generate and publish your TechDocs whenever a user in your organization makes a change to a documentation file stored in your GitHub repository. |
* You have an mkdocs.yaml file located in the root directory of your repository. | ||
* You have the `catalog.entity.create` and `catalog.location.create` permissions to import documentation into TechDocs from a remote repository. | ||
* You have an AWS S3 bucket to store your TechDocs sites. | ||
* Minimal IAM Policies are configured for your S3 bucket, granting both Write and Read access. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Minimal IAM Policies are configured for your S3 bucket, granting both Write and Read access. | |
* Minimal IAM policies are configured for your S3 bucket, granting both Write and Read access. |
(I'm not sure if it should be lowercase or uppercase. Please ignore if this isn't applicable)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check the UI
|
||
.Procedure | ||
|
||
. Set up the GitHub Actions workflow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
. Set up the GitHub Actions workflow | |
. Set up the GitHub Actions workflow. |
==== | ||
|
||
.Verification | ||
. Go to your {product-very-short} instance and click *Docs* to see the TechDocs served from your Amazon S3 bucket. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
. Go to your {product-very-short} instance and click *Docs* to see the TechDocs served from your Amazon S3 bucket. | |
. To see the TechDocs served from your Amazon S3 bucket, go to your {product-very-short} instance and click *Docs*. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, it makes sense to me to orient, state the action, and then the why, but I'm interested in hearing what Ingrid thinks about that
@@ -1,7 +1,7 @@ | |||
:_mod-docs-content-type: ASSEMBLY | |||
:context: configuring-techdocs | |||
[id="{context}"] | |||
= TechDocs configuration | |||
= Configuring TechDocs | |||
|
|||
The TechDocs plugin is preinstalled and enabled on a {product-short} instance by default. You can disable or enable the TechDocs plugin, and change other parameters, by configuring the {product} Helm chart or the {product} Operator ConfigMap. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(We did have a discussion that we're not mentioned that the core plugins are "preinstalled and enabled by default".. just wanted to check if this is okay?
. On the AWS console, create an AWS S3 bucket. | ||
.. On the *Create bucket* page, enter a *Bucket name* and use the default selections for all other settings. | ||
.. Create an IAM policy to give authorized users permissions to generate and publish TechDocs for your organization. | ||
.. On the *Create policy > Specify permissions* page, enter the following JSON content into the *Policy editor*: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.. On the *Create policy > Specify permissions* page, enter the following JSON content into the *Policy editor*: | |
.. On the *Create policy > Specify permissions* page, in the *Policy editor*, enter the following JSON content: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be careful documenting details of a third-party UI / webpage because it could change without our knowledge at any time
==== | ||
|
||
.Verification | ||
. Go to your Amazon S3 bucket to see a set of static site files in your *Objects* list. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
. Go to your Amazon S3 bucket to see a set of static site files in your *Objects* list. | |
. To see a set of static site files in your *Objects* list, go to your Amazon S3 bucket. |
==== | ||
TechDocs uses DOMPurify to sanitize HTML. To prevent DOMPurify from removing the `<iframe>` elements, you must list every permitted video host, such as www.youtube.com, under the `techdocs.sanitizer.allowedIframeHosts` section of your `app-config.yaml` file. You must also add the video host to the `backend.csp` section of your `app-config.yaml` file. | ||
==== | ||
. In the `frame-src` and `allowedIframeHosts` fields of your `app-config.yaml` file, add any video hosts that you want to use. You can add multiple. hosts. For example: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
. In the `frame-src` and `allowedIframeHosts` fields of your `app-config.yaml` file, add any video hosts that you want to use. You can add multiple. hosts. For example: | |
. In the `frame-src` and `allowedIframeHosts` fields of your `app-config.yaml` file, add any video hosts that you want to use. You can add multiple hosts. For example: |
IMPORTANT: Do Not Merge - To be merged by Docs Team Only
Version(s):
1.7
Issue:
RHIDP-7202
Previews:
Configure: https://redhat-developer.github.io/red-hat-developers-documentation-rhdh/pr-1228/techdocs/#configuring-techdocs
Generate pipeline: https://redhat-developer.github.io/red-hat-developers-documentation-rhdh/pr-1228/techdocs/#proc-techdocs-pipeline-github-actions_assembly-techdocs-add-docs
Embed videos: https://redhat-developer.github.io/red-hat-developers-documentation-rhdh/pr-1228/techdocs/#proc-techdocs-embed-video_assembly-techdocs-add-docs