Skip to content

Docker image to publish MoJ documentation repositories as github pages sites • This repository is defined and managed in Terraform

License

Notifications You must be signed in to change notification settings

ministryofjustice/tech-docs-github-pages-publisher

Repository files navigation

Tech Docs - GitHub Pages Publisher

repo standards badge

Open in GitHub Codespaces

This repository packages the Government Digital Service's tech-docs-gem in a container, to make it simple to use when developing and publishing your technical documentation using the template-documentation-site.

Usage of this container will be documented on the template-documentation-site.

Developing

Build Container

make build

Previewing Test Site

make preview

Managing Software Versions

Base Image and Ruby

Note

Dependabot might try to update this to the latest ruby image, but doing so will fail the Container Structure Test

The base image is derived from tech-docs-gem's latest supported Ruby version, which can be found in their test matrix.

As of 26/10/24, that version is 3.3.5.

Using 3.3.5, you can find the latest Alpine image by searching Docker Hub.

To obtain the SHA, you can run:

docker pull --platform linux/amd64 docker.io/ruby:3.3.5-alpine3.20

docker image inspect --format='{{ index .RepoDigests 0 }}' docker.io/ruby:3.3.5-alpine3.20

Gemfile and Gemfile.lock

Important

Dependabot is configured to maintain these, however this repository is just packaging govuk_tech_docs, so proceed with caution when reviewing and approving

When the Government Digital Service release a new version of govuk_tech_docs, update src/opt/publisher/Gemfile and run make build to generate a new Gemfile.lock, then run make exec and take a copy of /opt/publisher/Gemfile.lock to overwrite src/opt/publisher/Gemfile.lock.

Releasing

To create a new release, follow GitHub's guidance, opting to create a new tag in the process.