This commit is contained in:
+32
-19
@@ -11,22 +11,35 @@ jobs:
|
|||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Build Jekyll in Kubernetes job
|
||||||
env:
|
run: |
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
cat <<'EOF' | kubectl apply -f -
|
||||||
run: |
|
apiVersion: batch/v1
|
||||||
git clone --depth 1 https://alois:${GITEA_TOKEN}@git.alocoq.fr/alois/CoqResearch.git .
|
kind: Job
|
||||||
|
metadata:
|
||||||
- name: Install Ruby and Jekyll
|
name: jekyll-build
|
||||||
run: |
|
namespace: ci
|
||||||
apk add --no-cache ruby ruby-dev ruby-bundler build-base
|
spec:
|
||||||
bundle install --path vendor/bundle
|
backoffLimit: 0
|
||||||
|
template:
|
||||||
- name: Build
|
spec:
|
||||||
run: |
|
restartPolicy: Never
|
||||||
bundle exec jekyll build
|
containers:
|
||||||
|
- name: jekyll
|
||||||
- name: Deploy
|
image: ruby:3.3-alpine
|
||||||
run: |
|
command:
|
||||||
POD=$(kubectl get pods -n research -l app=research-nginx -o jsonpath='{.items[0].metadata.name}')
|
- sh
|
||||||
kubectl cp _site/. research/${POD}:/usr/share/nginx/html/
|
- -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
|
||||||
Reference in New Issue
Block a user