From 9a2a45da6576a649fea4b1c2316c7f9e4df0cd0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alo=C3=AFs=20Coquillard?= Date: Mon, 25 May 2026 14:44:13 +0000 Subject: [PATCH] Actualiser .gitea/workflows/deploy.yml --- .gitea/workflows/deploy.yml | 51 +++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 19 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index caed5e7..9570aba 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -11,22 +11,35 @@ jobs: timeout-minutes: 15 steps: - - name: Checkout - env: - GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} - run: | - git clone --depth 1 https://alois:${GITEA_TOKEN}@git.alocoq.fr/alois/CoqResearch.git . - - - name: Install Ruby and Jekyll - run: | - apk add --no-cache ruby ruby-dev ruby-bundler build-base - bundle install --path vendor/bundle - - - name: Build - run: | - bundle exec jekyll build - - - name: Deploy - run: | - POD=$(kubectl get pods -n research -l app=research-nginx -o jsonpath='{.items[0].metadata.name}') - kubectl cp _site/. research/${POD}:/usr/share/nginx/html/ \ No newline at end of file + - name: Build Jekyll in Kubernetes job + run: | + cat <<'EOF' | kubectl apply -f - + apiVersion: batch/v1 + kind: Job + metadata: + name: jekyll-build + namespace: ci + spec: + backoffLimit: 0 + template: + spec: + restartPolicy: Never + containers: + - name: jekyll + image: ruby:3.3-alpine + command: + - sh + - -c + - | + apk add --no-cache git build-base + git clone --depth 1 https://alois:${GITEA_TOKEN}@git.alocoq.fr/alois/CoqResearch.git /work + cd /work + bundle install + bundle exec jekyll build + env: + - name: GITEA_TOKEN + valueFrom: + secretKeyRef: + name: gitea-token + key: token + EOF \ No newline at end of file