diff --git a/TLLA/gitlab-ci-2023.yml b/TLLA/gitlab-ci-2023.yml new file mode 100644 index 0000000000000000000000000000000000000000..2127b71017864bbd90770703cf9d38f768334cd1 --- /dev/null +++ b/TLLA/gitlab-ci-2023.yml @@ -0,0 +1,80 @@ +stages: + - build + - deploy + +variables: + LC_ALL: C.UTF-8 + BUILD_DIR: public/ + CACHE_DIR: vendor/bundle/ + +.build: + image: ruby:3.1 + stage: build + before_script: + - apt-get update -qy + - gem install bundler + - cd web/ + - bundle config set --local path $CACHE_DIR + - bundle install + script: + - bundle exec jekyll build -d $BUILD_DIR --config $CONFIG + artifacts: + paths: + - web/$BUILD_DIR + cache: + paths: + - web/$CACHE_DIR + +.deploy: + image: debian:bullseye + stage: deploy + variables: + before_script: + - apt-get update -qy + - apt-get install -y lftp + - mkdir -p ~/.ssh + - chmod 700 ~/.ssh + - ssh-keyscan $SFTP_HOST >> ~/.ssh/known_hosts + - chmod 644 ~/.ssh/known_hosts + - cd web/ + script: + - lftp -e "set sftp:auto-confirm yes; + open sftp://$SFTP_HOST; + user $SFTP_USER $SFTP_PASSWORD; + mirror --exclude-glob .git* + --exclude .git/ + --reverse + --verbose + --delete + $BUILD_DIR + $DEPLOY_DIR; + bye" + +build.dev: + extends: .build + variables: + CONFIG: _config.yml,_config-dev.yml + only: + - web.dev + +build.prod: + extends: .build + variables: + CONFIG: _config.yml + JEKYLL_ENV: production + only: + - web.prod + +deploy.dev: + extends: .deploy + variables: + DEPLOY_DIR: $DEV_DEPLOY_DIR + only: + - web.dev + +deploy.prod: + extends: .deploy + variables: + DEPLOY_DIR: $PROD_DEPLOY_DIR + only: + - web.prod diff --git a/TLLA/gitlab-ci-tlla.yml b/TLLA/gitlab-ci-tlla.yml new file mode 100644 index 0000000000000000000000000000000000000000..6d5d4a2bcc4dd4d6a4bda1810c64c010739152b3 --- /dev/null +++ b/TLLA/gitlab-ci-tlla.yml @@ -0,0 +1,81 @@ +stages: + - build + - deploy + +variables: + LC_ALL: C.UTF-8 + BUILD_DIR: public/ + CACHE_DIR: vendor/bundle/ + +.build: + image: ruby:3.1 + stage: build + before_script: + - apt-get update -qy + - gem install bundler + - cd web/ + - bundle config set --local path $CACHE_DIR + - bundle install + script: + - bundle exec jekyll build -d $BUILD_DIR --config $CONFIG + artifacts: + paths: + - web/$BUILD_DIR + cache: + paths: + - web/$CACHE_DIR + +.deploy: + image: debian:bullseye + stage: deploy + variables: + before_script: + - apt-get update -qy + - apt-get install -y lftp + - mkdir -p ~/.ssh + - chmod 700 ~/.ssh + - ssh-keyscan $SFTP_HOST >> ~/.ssh/known_hosts + - chmod 644 ~/.ssh/known_hosts + - cd web/ + script: + - lftp -e "set sftp:auto-confirm yes; + open sftp://$SFTP_HOST; + user $SFTP_USER $SFTP_PASSWORD; + mirror --exclude-glob .git* + --exclude-glob 20??/ + --exclude .git/ + --reverse + --verbose + --delete + $BUILD_DIR + $DEPLOY_DIR; + bye" + +build.dev: + extends: .build + variables: + CONFIG: _config.yml,_config-dev.yml + only: + - web.dev + +build.prod: + extends: .build + variables: + CONFIG: _config.yml + JEKYLL_ENV: production + only: + - web.prod + +deploy.dev: + extends: .deploy + variables: + DEPLOY_DIR: $DEV_DEPLOY_DIR + only: + - web.dev + +deploy.prod: + extends: .deploy + variables: + DEPLOY_DIR: $PROD_DEPLOY_DIR + only: + - web.prod