kb-one-de/.github/workflows/main.yml
kB01 e31b8d92ac
Some checks failed
CI / build (push) Failing after 42s
Chaged Build to run on docker
2024-04-11 20:00:19 +02:00

50 lines
1.5 KiB
YAML

name: CI
on: [push]
jobs:
build:
env:
HUGO_VERSION: ${{ github.sha }}
TZ: Asia/Shanghai
runs-on: docker
steps:
- name: Git checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Set git config core.quotepath false # https://github.com/gohugoio/hugo/issues/9810#issuecomment-1107519804
run: git config --global core.quotepath false
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '21.x'
- name: Install Theme
run: cd themes/kb-one-de-theme && yarn install --production
- name: Install PostCSS-CLI
run: npm install postcss-cli -g
- name: Setup hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.123.8'
extended: true
- name: Build Hugo
run: echo "HUGO_VERSION -> $HUGO_VERSION" && hugo --gc --minify --cleanDestinationDir
- name: Hugo-Encrypt
run: cd themes/kb-one-de-theme && node ./hugo-encrypt.js
- name: Upload Artifacts
if: ${{ false }}
uses: forgejo/upload-artifact@v4
with:
name: public
path: ./public/