+ New builder templates
This commit is contained in:
parent
23220caf7a
commit
1a42031aac
@ -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
13
ci/builders.yml
Normal 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/
|
||||
|
Loading…
Reference in New Issue
Block a user