variables: GIT_SUBMODULE_STRATEGY: recursive stages: - docker-build - lint_build_test - deploy lint: stage: lint_build_test image: name: docker/compose:1.24.1 entrypoint: - /bin/sh - "-c" services: - docker:dind variables: DOCKER_HOST: "tcp://docker:2375/" DOCKER_DRIVER: overlay2 GIT_SUBMODULE_STRATEGY: none script: - docker-compose pull - docker-compose run xo-js-lint - docker-compose run xo-html-lint - docker-compose run sass-lint build: stage: lint_build_test image: name: klakegg/hugo:0.78.1-ext-alpine@sha256:7c2d3702546b5aaddf7f960d138715f12ba4b94906d9dfcc2d4a5a4e8c4cb760 entrypoint: - /bin/sh - "-c" script: - hugo --minify artifacts: paths: - public expire_in: 1 week only: - master test: stage: lint_build_test image: name: klakegg/hugo:0.78.1-ext-alpine@sha256:7c2d3702546b5aaddf7f960d138715f12ba4b94906d9dfcc2d4a5a4e8c4cb760 entrypoint: - /bin/sh - "-c" script: - hugo_output=$(hugo --path-warnings --i18n-warnings) - echo "$hugo_output" - if echo "$hugo_output" | grep -q 'i18n|MISSING_TRANSLATION'; then false; else true; fi - if echo "$hugo_output" | grep -q 'WARN.*Duplicate target paths'; then false; else true; fi artifacts: paths: - public expire_in: 3 days firebase-deploy: stage: deploy image: andreysenov/firebase-tools dependencies: - build script: - firebase deploy --only hosting only: - master docker-build: stage: docker-build image: name: docker/compose:1.24.1 entrypoint: - /bin/sh - "-c" services: - docker:dind variables: DOCKER_HOST: "tcp://docker:2375/" DOCKER_DRIVER: overlay2 GIT_SUBMODULE_STRATEGY: none when: manual before_script: - echo $CI_JOB_TOKEN | docker login -u gitlab-ci-token --password-stdin $CI_REGISTRY script: - docker-compose build - docker-compose push