gcg-website/.gitlab-ci.yml

46 lines
1.1 KiB
YAML
Raw Normal View History

2022-03-20 12:25:50 +00:00
image: registry.gitlab.com/pages/hugo/hugo_extended:latest
variables:
GIT_SUBMODULE_STRATEGY: recursive
2022-03-20 16:37:31 +00:00
deploy_website:
2022-03-20 13:15:09 +00:00
before_script:
2022-03-20 16:37:31 +00:00
- apk add --update --no-cache git curl
- git config --global user.name "Denys Konovalov"
- git config --global user.email "denys.konovalov@protonmail.com"
2022-03-20 12:25:50 +00:00
script:
2022-03-20 16:37:31 +00:00
- hugo --gc --minify --cleanDestinationDir
- git clone --depth=1 --single-branch --branch main "https://x-access-token:$TOKEN@gitlab.cantorgymnasium.de/cantortechnik/website-build.git"
/tmp/gh-pages
2022-03-20 16:37:31 +00:00
- rm -rf /tmp/gh-pages/*
- export OLD_PATH=$PWD
2022-03-20 16:41:21 +00:00
- cp -r public/* /tmp/gh-pages
2022-03-20 16:37:31 +00:00
- cd /tmp/gh-pages
- git add .
- git commit -m "$CI_COMMIT_MESSAGE"
- git push -u origin main --force
- cd $OLD_PATH
- curl $host_url
2022-03-20 12:25:50 +00:00
artifacts:
paths:
- public
rules:
- if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH"
stages:
- build
- test
- deploy
- review
- dast
- staging
- canary
- production
- incremental rollout 10%
- incremental rollout 25%
- incremental rollout 50%
- incremental rollout 100%
- performance
- cleanup
sast:
stage: test
include:
- template: Auto-DevOps.gitlab-ci.yml