2023-12-04 20:39:43 +01:00
|
|
|
variables:
|
|
|
|
GIT_SUBMODULE_STRATEGY: recursive
|
|
|
|
|
2024-08-23 02:04:03 +02:00
|
|
|
## GitLab defaults to:
|
|
|
|
# stages:
|
|
|
|
# - build
|
|
|
|
# - test
|
|
|
|
# - deploy
|
|
|
|
|
|
|
|
build-site:
|
|
|
|
stage: build
|
|
|
|
image: registry.gitlab.com/pages/hugo/hugo_extended
|
2023-12-22 10:16:24 +01:00
|
|
|
script:
|
2024-08-23 02:04:03 +02:00
|
|
|
- hugo
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- public
|
2023-12-22 10:16:24 +01:00
|
|
|
|
2024-08-23 02:04:03 +02:00
|
|
|
test-html:
|
|
|
|
stage: test
|
|
|
|
image:
|
|
|
|
name: wjdp/htmltest:latest
|
|
|
|
entrypoint: [""]
|
|
|
|
cache:
|
|
|
|
key: htmltest-cache
|
|
|
|
paths:
|
|
|
|
- tmp/
|
2024-04-16 07:26:02 +02:00
|
|
|
script:
|
2024-08-23 02:04:03 +02:00
|
|
|
- htmltest
|
2024-04-16 07:26:02 +02:00
|
|
|
|
2024-08-23 02:04:03 +02:00
|
|
|
test-trailing-spaces:
|
|
|
|
stage: test
|
|
|
|
needs: [] # ok to run before build-site
|
2023-12-04 20:39:43 +01:00
|
|
|
script:
|
2024-08-23 02:04:03 +02:00
|
|
|
- ./test_trailing_spaces.sh
|
2023-12-04 20:39:43 +01:00
|
|
|
|
2024-08-23 02:04:03 +02:00
|
|
|
# The GitLab Pages job must always be named "pages", and result in a "public" artifact.
|
|
|
|
# Our "public" artifact is created above, but GitLab jobs will fetch all artifacts from previous stages.
|
2023-12-04 20:39:43 +01:00
|
|
|
pages:
|
2024-08-23 02:04:03 +02:00
|
|
|
stage: deploy
|
|
|
|
script: ls -ld public
|
2023-12-04 20:39:43 +01:00
|
|
|
only:
|
2024-08-23 02:04:03 +02:00
|
|
|
- main
|