+ New builder templates

This commit is contained in:
shockrah 2022-03-20 15:54:56 -07:00
parent 23220caf7a
commit 1a42031aac
2 changed files with 25 additions and 21 deletions

View File

@ -1,40 +1,31 @@
image: shockrah/website:latest
stages:
- build
- deploy
include:
- local: 'ci/builders.yml'
build-site:
only:
refs:
- master
stage: build
build-neocities: &builder
script:
- hugo version
- hugo
- hugo --config configs/neocities.toml
build-pages: &builder
script:
- hugo --config configs/pages.toml
artifacts:
paths:
- public/
pages:
stage: deploy
needs:
- build-site
- build-pages
dependencies:
- build-site
# Dummy script to keep the job valid
script:
- >
if [ -d public/ ]; then
echo 'Public directory found'
else
echo 'Nothing found'
fi
- echo Dummy echo for pages job
artifacts:
paths:
- public/
@ -47,6 +38,6 @@ neocities:
- build-site
when: manual
dependencies:
- build-site
- build-neocities
script:
- bash scripts/neocities.sh

13
ci/builders.yml Normal file
View File

@ -0,0 +1,13 @@
# This defines a script which all builders can basically inherit from
.builder:
stage: build
image: shockrah/website:latest
only:
refs:
- master
script:
- hugo
artifacts:
paths:
- public/