This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
name: Build and Deploy Hugo
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: native
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install Hugo
|
||||
run: |
|
||||
HUGO_VERSION=0.147.2
|
||||
wget -q https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz
|
||||
tar -xzf hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz hugo
|
||||
mv hugo /usr/local/bin/hugo
|
||||
hugo version
|
||||
|
||||
- name: Build
|
||||
run: hugo --minify
|
||||
|
||||
- name: Deploy
|
||||
run: |
|
||||
POD=$(kubectl get pods -n blog -l app=hugo-nginx -o jsonpath='{.items[0].metadata.name}')
|
||||
kubectl cp public/. blog/${POD}:/usr/share/nginx/html/
|
||||
Reference in New Issue
Block a user