204487f6d7fb15cc06df0aba6b621c3693bc2bef
Hugo runner
Update image
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:
runner:
labels:
- "hugo:docker://git.nortelli.fr/erwan/hugo:latest"
container:
network: "<runner-network>"
cache:
enabled: true
host: "<runner-container-name>"
Use image
Add registry secrets in https://git.nortelli.fr/user/settings/actions/secrets:
REGISTRY_USER: your usernameREGISTRY_TOKEN: a token withpackage: read
Setup a Gitea workflow:
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
Description
Languages
Dockerfile
100%