add gitlab ci stuffz

This commit is contained in:
parent 59d8a0074c
commit faa6021461
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C
2 changed files with 49 additions and 0 deletions

19
.gitlab-ci.yml Normal file

@ -0,0 +1,19 @@
variables:
GIT_SUBMODULE_STRATEGY: recursive
include:
- file: '/action.yml'
project: 'templates/hugo-obsidian'
inputs:
index: "true"
input: content
output: assets/indices
root: .
- file: "/.gitlab/hugo.template.yml"
stages:
- index
- setup-hugo
- deploy
deploy:
stage: deploy
script:
- cp -r ${CI_PROJECT_DIR}/* ${DEPLOY_PATH}

30
.gitlab/hugo.template.yml Normal file

@ -0,0 +1,30 @@
name: 'Hugo setup'
description: 'GitHub Actions for Hugo ⚡️ Setup Hugo quickly and build your site fast. Hugo extended and Hugo Modules are supported.'
spec:
inputs:
hugo-version:
description: 'The Hugo version to download (if necessary) and use. Example: 0.58.2'
required: false
default: 'latest'
extended:
description: 'Download (if necessary) and use Hugo extended version. Example: true'
required: false
default: 'false'recursive
HUGO_ENV: production
---
variables:
GIT_SUBMODULE_STRATEGY: recursive
setup-hugo:
stage: setup-hugo
image: registry.gitlab.com/pages/hugo/hugo_extended:latest
script:
- cd ${CI_PROJECT_DIR}
- hugo --minify
# runs:
# using: 'node16'
# main: 'lib/index.js'
# branding:
# icon: 'package'
# color: 'yellow'