# This file is a template, and might need editing before it works on your project. # Full project: https://gitlab.com/pages/nanoc image: ruby:2.4 stages: - build - test - deploy before_script: - ruby -v - bundle install --jobs 4 --path vendor variables: BRANCH_CE: '8-17-stable' BRANCH_EE: '8-17-stable-ee' BRANCH_OMNIBUS: '8-17-stable' BRANCH_RUNNER: '1-9-stable' compile: stage: build script: - rake pull_repos - nanoc --verbose artifacts: paths: - public expire_in: 1w cache: key: "$CI_BUILD_NAME/$CI_BUILD_REF_NAME" paths: - tmp/ - vendor/ruby tags: - docker internal_links: stage: test script: - nanoc check internal_links allow_failure: true cache: key: "$CI_BUILD_NAME/$CI_BUILD_REF_NAME" paths: - vendor/ruby tags: - docker dependencies: - compile scss_lint: stage: test script: - bundle exec scss-lint cache: key: "$CI_BUILD_NAME/$CI_BUILD_REF_NAME" paths: - vendor/ruby tags: - docker review: stage: deploy variables: GIT_STRATEGY: none before_script: [] cache: {} script: - rsync -av --delete public /srv/nginx/pages/$CI_BUILD_REF_NAME environment: name: review/$CI_BUILD_REF_NAME url: http://$CI_BUILD_REF_NAME.$APPS_DOMAIN on_stop: review_stop only: - branches@gitlab-com/gitlab-docs except: - master tags: - nginx - review-apps review_stop: stage: deploy variables: GIT_STRATEGY: none before_script: [] artifacts: {} cache: {} dependencies: [] script: - rm -rf public /srv/nginx/pages/$CI_BUILD_REF_NAME when: manual environment: name: review/$CI_BUILD_REF_NAME action: stop only: - branches@gitlab-com/gitlab-docs except: - master tags: - nginx - review-apps pages: stage: deploy variables: GIT_STRATEGY: none before_script: [] cache: {} environment: name: production url: https://docs.gitlab.com script: # Symlink all README.html to index.html - for i in `find public -name README.html`; do ln -sf README.html $(dirname $i)/index.html; done artifacts: paths: - public expire_in: 1h only: - master@gitlab-com/gitlab-docs tags: - docker dependencies: - compile