3.6. Generating TechDocs Pipelines with GitHub Actions


Red Hat Developer Hub (RHDH) includes a built-in TechDocs builder, however, the default setup is not intended for production use. Deploying TechDocs documentation in a production environment involves the following actions:

  • Building the documentation in a CI/CD system
  • Publishing the generated documentation site to external object storage, such as AWS S3, to ensure that the generated documentation persists between restarts of RHDH and can handle larger documentation workloads.
  • Configuring TechDocs in your RHDH 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 repository.

Prerequisites

  • The TechDocs plugin is enabled and configured on your RHDH instance.
  • Your organization has documentation files stored in a remote 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.
  • An administrator has created an IAM User, attached the necessary policy, and generated an access key in the AWS console.

Procedure

  1. Set up the GitHub Actions workflow.

    1. On GitHub, create a fork of the RHDH TechDocs Pipeline repository.

      참고

      The rhdh-techdocs-pipeline repository contains a generate-and-publish-techdocs.yaml workflow that automatically generates TechDocs from the docs folder and publishes them to an Amazon S3 bucket.

    2. Use the GitHub GUI to make sure that all of the permissions required to run the workflow are enabled.
    3. Add the Repository secrets required to connect the workflow to your AWS account, for example, TECHDOCS_S3_BUCKET_NAME, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION.

      참고

      The default mkdocs.yaml file in the rhdh-techdocs-pipeline workflow installs the techdocs-core and minify plugins.

    4. Optional: Customize the default structure or files of the rhdh-techdocs-pipeline repository to meet the needs of your organization.
    5. Optional: Add other mkdocs plugins that you want to use by adding the name of the plugins to the plugins section of the mkdocs.yaml file and to the steps.name: install mkdocs and mkdocs plugins section of the generate-and-publish-techdocs.yaml file.
  2. . In the navigation menu of the OpenShift Container Platform console, click ConfigMaps and select your RHDH app-config.yaml file.
  3. Update the app-config.yaml file to enable your Amazon S3 bucket to serve TechDocs to your RHDH instance. For example:

    techdocs:
      builder: external
      publisher:
        type: awsS3
        awsS3:
          bucketName: ${AWS_S3_BUCKET_NAME}
          accountId: ${AWS_ACCOUNT_ID}
          region: ${AWS_REGION}
    
    aws:
      accounts:
        - accountId: ${AWS_ACCOUNT_ID}
          accessKeyId: ${AWS_ACCESS_KEY_ID}
          secretAccessKey: ${AWS_SECRET_ACCESS_KEY}
    
    catalog:
         locations:
            - type: url
              target: https://github.com/<your_org>/rhdh-techdocs-pipeline/blob/main/catalog-info.yaml
  4. Click Save.
  5. In the navigation menu of the OpenShift Container Platform console, click Topology and restart the pod.

    참고

    Changes to the docs folder or the mkdocs.yaml file trigger the rhdh-techdocs-pipeline workflow to run. After the rhdh-techdocs-pipeline workflow runs successfully, the generated TechDocs are uploaded to your Amazon S3 bucket.

Verification

  1. Go to your RHDH instance and click Docs to see the TechDocs served from your Amazon S3 bucket.
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동