Actualiser .gitea/workflows/deploy.yml
Build and Deploy Jekyll / build (push) Has been cancelled

This commit is contained in:
2026-05-25 14:27:25 +00:00
parent 87ff37dddb
commit bce8c1c8eb
+3 -17
View File
@@ -9,6 +9,7 @@ jobs:
build: build:
runs-on: native runs-on: native
timeout-minutes: 15 timeout-minutes: 15
steps: steps:
- name: Checkout - name: Checkout
env: env:
@@ -22,25 +23,10 @@ jobs:
bundle install --path vendor/bundle bundle install --path vendor/bundle
- name: Build - name: Build
run: bundle exec jekyll build
- name: Install kubectl
run: | run: |
wget -q https://dl.k8s.io/release/v1.31.0/bin/linux/amd64/kubectl bundle exec jekyll build
chmod +x kubectl
mv kubectl /usr/local/bin/kubectl
- name: Deploy - name: Deploy
env:
KUBE_TOKEN: ${{ secrets.KUBE_TOKEN }}
KUBE_SERVER: ${{ secrets.KUBE_SERVER }}
run: | run: |
unset KUBERNETES_SERVICE_HOST KUBERNETES_SERVICE_PORT
kubectl config set-cluster homelab \
--server=${KUBE_SERVER} \
--insecure-skip-tls-verify=true
kubectl config set-credentials deployer --token=${KUBE_TOKEN}
kubectl config set-context homelab --cluster=homelab --user=deployer
kubectl config use-context homelab
POD=$(kubectl get pods -n research -l app=research-nginx -o jsonpath='{.items[0].metadata.name}') 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/ kubectl cp _site/. research/${POD}:/usr/share/nginx/html/