Skip to content
Snippets Groups Projects
Commit a68f1913 authored by Onno Haldar's avatar Onno Haldar
Browse files

Add .hugo-go-module-pages.yml

parent 70833e69
No related branches found
No related tags found
No related merge requests found
#
# Publish GO HUGO GitLab Pages Site using Go Modules option
# Themes and template reference using GO Module system
#
stages:
- validate
- publish
test:
image: registry.gitlab.com/pages/hugo/hugo_extended:latest
stage: validate
before_script:
# Add Go Module dependencies
- apk --no-cache add git
- apk --no-cache add go
script:
# Test Site Generation Templates
- hugo -D -E -F
only:
- dev
pages:
image: registry.gitlab.com/pages/hugo/hugo_extended:latest
stage: publish
before_script:
# Add Go Module dependencies
- apk --no-cache add git
- apk --no-cache add go
script:
# Generate Site from Repository Project
- |
echo "Add HUGO Configuration from CI-variables. "
echo "============================================="
echo "baseURL: '$CI_PAGES_URL'" >> config/$CI_JOB_NAME/config.yml
echo "title: '$CI_PROJECT_TITLE'" >> config/$CI_JOB_NAME/config.yml
- hugo config --environment $CI_JOB_NAME
- hugo -D -E -F --environment $CI_JOB_NAME
artifacts:
paths:
- public
only:
- main
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment