Merge branch 'main' of ssh://git.kb-one.de:9522/kb01/kb-one-de
Some checks failed
CI / build (push) Has been cancelled
Some checks failed
CI / build (push) Has been cancelled
This commit is contained in:
commit
56b98855bd
3 changed files with 63 additions and 1 deletions
50
.github/workflows/main.yml
vendored
Normal file
50
.github/workflows/main.yml
vendored
Normal file
|
@ -0,0 +1,50 @@
|
|||
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: https://github.com/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: ${{ true }}
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: public
|
||||
path: ./public/
|
2
.gitmodules
vendored
2
.gitmodules
vendored
|
@ -1,4 +1,4 @@
|
|||
[submodule "themes/kb-one-de-theme"]
|
||||
path = themes/kb-one-de-theme
|
||||
url = ssh://git@git.kb-one.de:9522/kb01/kb-one-de-theme.git
|
||||
url = https://git.kb-one.de/kb01/kb-one-de-theme
|
||||
branch = kb-one-edit
|
||||
|
|
12
shell.nix
Normal file
12
shell.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
with import <nixpkgs> {};
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "node";
|
||||
buildInputs = [
|
||||
nodejs_21
|
||||
hugo
|
||||
];
|
||||
shellHook = ''
|
||||
export PATH="$PWD/node_modules/.bin/:$PATH"
|
||||
'';
|
||||
}
|
Loading…
Add table
Reference in a new issue