apiVersion: batch/v1 kind: Job metadata: name: hugo-build-deploy spec: template: spec: containers: - name: hugo-builder image: alpine:latest command: ["/bin/sh", "-c"] args: - | apk add --no-cache git hugo git clone $GIT_REPO /src cd /src hugo --minify --enableGitInfo npm install -g @cloudflare/wrangler wrangler publish --project-name $CFP_PROJECT_NAME --env $CFP_ENVIRONMENT env: - name: HUGO_ENVIRONMENT value: production - name: GIT_REPO # value: git.nc.landry.land/davad/portfolio-site.git value: "ssh://git@gitea-ssh.gitops.svc.cluster.local:2222/davad/portfolio-site.git" - name: CFP_PROJECT_NAME - name: CFP_ENVIRONMENT - name: CF_API_TOKEN valueFrom: secretKeyRef: name: cloudflare-secret key: api-token volumeMounts: - name: ssh-key-volume mountPath: "/etc/ssh-key" - name: src-volume mountPath: /src restartPolicy: Never volumes: - name: src-volume emptyDir: {} - name: ssh-key-volume secret: secretName: git-ssh-key defaultMode: 256 backoffLimit: 4