Hugo reusable deployment workflow
- Python 88.5%
- Dockerfile 11.5%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
All checks were successful
Publish Hugo Deployment Image / publish (push) Successful in 27s
|
||
| .forgejo/workflows | ||
| .dockerignore | ||
| Dockerfile | ||
| README.md | ||
Hugo Deployment
Shared Forgejo deployment image scaffold for Develton-managed Hugo sites.
Contents
- Prebuilt deployment image with Hugo, rsync, and OpenSSH client tools
- Forgejo workflow that publishes versioned and
latestimage tags - Image publish path intended for
registry.develton.com
Prerequisites
- Repository must be public if other repos call the reusable workflow directly
- Forgejo variables:
REGISTRY_HOST,REGISTRY_USERNAME - Forgejo secrets:
REGISTRY_PASSWORD - The image was smoke-tested locally, and
hugo version,rsync --version, andssh -Vwere confirmed successfully.
Sites
neilb.comboholtoday.comboholcentral.comcloud.develton.comkomsysnet.comthefreelancemastery.com
Image Publishing
The publish workflow runs on docker-desktop and publishes the versioned tag on every run.
- Pushes to
mainpublishregistry.develton.com/cliper/hugo-deployment:<commit-sha>and also movelatest - Pushes of Git tags like
v1publish the matching image tag without movinglatest - Manual runs can override the tag with
image_tag - Manual runs do not move
latestunlesspublish_latestis set totrue
It pushes:
registry.develton.com/cliper/hugo-deployment:<tag>registry.develton.com/cliper/hugo-deployment:latest
Required variables and secrets:
REGISTRY_HOSTREGISTRY_USERNAMEREGISTRY_PASSWORD
Workflow inputs:
image_tagpublish_latest
Reusable Workflow
Site repos call the shared workflow with:
jobs:
deploy:
runs-on: docker-desktop
uses: https://git.develton.com/cliper/hugo_deployment/.forgejo/workflows/deploy-hugo-site.yml@v1
with:
deploy_script: ./scripts/deploy.sh
secrets:
deploy_ssh_key: ${{ secrets.DEPLOY_SSH_KEY }}
Notes:
- For the current caller pattern,
DEPLOY_SSH_HOST,DEPLOY_SSH_USER, andDEPLOY_PATHare required repo variables unless the caller explicitly passes host and user as workflow inputs - Caller repos pass
DEPLOY_SSH_KEYthroughjobs.<job_id>.secrets; Forgejo v11 accepts caller-provided reusable workflow secrets even thoughon.workflow_callitself only documentsinputsandoutputs - Caller workflows should use the fully qualified workflow URL because shorthand cross-repo
owner/repo/...@refresolution on the current Develton Forgejo instance is producinghttps:///...clone URLs for reusable workflows - Caller workflows should keep
runs-on: docker-desktopon the job that uses this reusable workflow when running against the current Develton Forgejo instance, which avoids buggy workflow expansion on the server side - Caller repos can set
DEPLOY_KNOWN_HOSTSin repo variables with a pinnedknown_hostsentry for stronger host verification - If
DEPLOY_KNOWN_HOSTSis not set, the workflow falls back tossh-keyscanso current repos keep working - The reusable workflow itself always runs on
docker-desktop - The reusable workflow resolves its container image as
registry.develton.com/cliper/hugo-deployment:v1, so caller repos do not needREGISTRY_HOSTjust to start the job - Because the reusable workflow job container is resolved before checkout, callers must not switch over until
registry.develton.com/cliper/hugo-deployment:v1has been published and verified pullable by the runner - The reusable workflow is currently pinned to
registry.develton.com/cliper/hugo-deployment:v1