37 lines
656 B
YAML
37 lines
656 B
YAML
image: "node:lts-slim"
|
|
|
|
variables:
|
|
HUGO_VERSION: "0.73.0"
|
|
GIT_SUBMODULE_STRATEGY: recursive
|
|
|
|
stages:
|
|
- test
|
|
- deploy
|
|
|
|
cache:
|
|
key: ${CI_COMMIT_REF_SLUG}
|
|
paths:
|
|
- .npm
|
|
- .cache
|
|
|
|
before_script:
|
|
- apt-get update && apt-get install -y curl
|
|
- curl -Lo /tmp/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.deb
|
|
- dpkg -i /tmp/hugo.deb
|
|
- touch .env
|
|
- npm ci --cache .npm --prefer-offline
|
|
|
|
test:
|
|
stage: test
|
|
script:
|
|
- ./scripts/test.sh
|
|
|
|
pages:
|
|
stage: deploy
|
|
script:
|
|
- ./scripts/release.sh
|
|
artifacts:
|
|
paths:
|
|
- public
|
|
only:
|
|
- master
|