39 lines
894 B
YAML
39 lines
894 B
YAML
name: Build and Deploy Hugo
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: native
|
|
steps:
|
|
- name: Checkout
|
|
run: |
|
|
git clone --recurse-submodules https://git.alocoq.fr/alois/CoqBlog.git .
|
|
ls -la themes/
|
|
ls -la themes/PaperMod/
|
|
|
|
- name: Install Hugo
|
|
run: |
|
|
apk add --no-cache hugo git
|
|
hugo version
|
|
|
|
- name: Build
|
|
run: hugo --minify
|
|
|
|
- name: Install kubectl
|
|
run: |
|
|
wget -q https://dl.k8s.io/release/v1.31.0/bin/linux/amd64/kubectl
|
|
chmod +x kubectl
|
|
mv kubectl /usr/local/bin/kubectl
|
|
|
|
- name: Deploy
|
|
env:
|
|
KUBE_TOKEN: ${{ secrets.KUBE_TOKEN }}
|
|
KUBE_SERVER: ${{ secrets.KUBE_SERVER }}
|
|
run: |
|
|
echo "Server: ${KUBE_SERVER}"
|
|
echo "Token length: ${#KUBE_TOKEN}"
|
|
|