diff --git a/.github-ci.yml b/.github-ci.yml new file mode 100644 index 00000000..3578da3d --- /dev/null +++ b/.github-ci.yml @@ -0,0 +1,13 @@ +image: registry.gitlab.com/pages/hugo/hugo_extended:latest + +variables: + GIT_SUBMODULE_STRATEGY: recursive + +pages: + script: + - hugo + artifacts: + paths: + - public + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..c30082e7 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,29 @@ +image: registry.gitlab.com/pages/hugo/hugo_extended:latest + +variables: + GIT_SUBMODULE_STRATEGY: recursive + + + +deploy_website: + before_script: + - apk add --update --no-cache git curl + - git config --global user.name "Denys Konovalov" + - git config --global user.email "denys.konovalov@protonmail.com" + script: + - 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 + - rm -rf /tmp/gh-pages/* + - export OLD_PATH=$PWD + - cp -r public/* /tmp/gh-pages + - cd /tmp/gh-pages + - git add . + - git commit -m "$CI_COMMIT_MESSAGE" + - git push -u origin main --force + - cd $OLD_PATH + - curl $host_url + artifacts: + paths: + - public + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH \ No newline at end of file diff --git a/.hugo_build.lock b/.hugo_build.lock deleted file mode 100644 index e69de29b..00000000