From ffce332e84111e60c8f95590da19c0c6666cf203 Mon Sep 17 00:00:00 2001 From: Erwan Normand Date: Tue, 16 Jun 2026 21:54:06 +0200 Subject: [PATCH] docs: add README.md --- README.md | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..992815d --- /dev/null +++ b/README.md @@ -0,0 +1,58 @@ +# Hugo runner + +## Update image + +```bash +docker build -t git.nortelli.fr/erwan/hugo:latest . +docker login git.nortelli.fr +docker push git.nortelli.fr/erwan/hugo:latest +``` + +## Setup Gitea runner + +Update `act_runner/config.yaml`: + +```yaml +runner: + labels: + - "hugo:docker://git.nortelli.fr/erwan/hugo:latest" +``` + +## Use image + +Add registry secrets in https://git.nortelli.fr/user/settings/actions/secrets: + +- `REGISTRY_USER`: your username +- `REGISTRY_TOKEN`: a [token](https://git.nortelli.fr/user/settings/applications) with `package: read` + +Setup a Gitea workflow: + +```yaml +jobs: + build-deploy: + runs-on: hugo + env: + HUGO_CACHEDIR: /tmp/hugo_cache + HUGO_ENVIRONMENT: production + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: actions/cache@v4 + with: + path: ~/.cache/yarn + key: yarn-${{ hashFiles('yarn.lock') }} + restore-keys: yarn- + + - run: yarn install --frozen-lockfile + + - uses: actions/cache@v4 + with: + path: ${{ env.HUGO_CACHEDIR }} + key: hugo-${{ hashFiles('go.sum') }} + restore-keys: hugo- + + - run: hugo --noChmod --gc --minify +```