Sign inSign up

siknitrus/hugo-cloudflare-ci

By siknitrus

•Updated 11 days ago

CI image for Hugo sites with Node.js, Python, Git, and Cloudflare Wrangler

Image
Integration & delivery
0

214

siknitrus/hugo-cloudflare-ci repository overview

⁠Hugo Cloudflare CI

Reusable Docker image for CI pipelines that build Hugo sites and deploy them with Cloudflare Wrangler.

⁠Overview

This image bundles the tools commonly needed by Hugo + Cloudflare projects into one ready-to-use CI environment. Use it when you want predictable Hugo builds without installing Node.js, Python, Wrangler, Git, and Hugo in every pipeline run.

⁠Tags

  • latest - current image build
  • <hugo-version> - image pinned to the Hugo version from .hugo-version

⁠Included Tools

The image includes:

  • Node.js 22
  • Hugo Extended, version from .hugo-version
  • Python 3
  • Python requests
  • Cloudflare Wrangler
  • Git and basic CA certificates

⁠Build Locally

docker build --build-arg HUGO_VERSION=$(cat .hugo-version) -t hugo-cloudflare-ci:$(cat .hugo-version) .

⁠Test Locally

docker run --rm hugo-cloudflare-ci:$(cat .hugo-version) hugo version
docker run --rm hugo-cloudflare-ci:$(cat .hugo-version) python3 -c "import requests; print(requests.__version__)"
docker run --rm hugo-cloudflare-ci:$(cat .hugo-version) wrangler --version

⁠Publish From Bitbucket

Set repository variables:

  • DOCKERHUB_USERNAME
  • DOCKERHUB_PASSWORD
  • optional IMAGE_NAME, for example siknitrus/hugo-cloudflare-ci

Then run the custom pipeline publish.

It publishes:

  • $IMAGE_NAME:<hugo-version>
  • $IMAGE_NAME:latest

⁠Use In Hugo Projects

image: siknitrus/hugo-cloudflare-ci:0.165.0

pipelines:
  default:
    - step:
        name: Build and Deploy
        script:
          - python3 script.py
          - cd hugo
          - hugo
          - cd ..
          - wrangler deploy --config wrangler.jsonc

Required project variables for Cloudflare deploy:

  • CLOUDFLARE_API_TOKEN
  • CLOUDFLARE_ACCOUNT_ID

If a project does not need Python data generation, remove the python3 script.py line.

Tag summary

Content type

Image

Digest

sha256:a4b0097f5…

Size

213.8 MB

Last updated

11 days ago

docker pull siknitrus/hugo-cloudflare-ci