image: ruby:3.1 variables: JEKYLL_ENV: production LC_ALL: C.UTF-8 before_script: - bundle install test: stage: test script: - bundle exec jekyll build -d test artifacts: paths: - test except: - butter-box pages: stage: deploy script: - apt-get update - apt-get install -y zip # Build the default EN version - sed -i "s/REPLACEME/butterbox/g" _data/deployment.yml - bundle exec jekyll build -d public - cd public - zip -r ../site-en.zip ./ - cd .. - git restore . # Build the ES version (TODO: use a single build for all deployments) - "sed -i 's/^languages:.*/languages: [\"es\", \"en\"]/g' ../butter-box-ui/_config.yml" - sed -i "s/REPLACEME/comolamantequilla/g" _data/deployment.yml - bundle exec jekyll build -d public - cd public - zip -r ../site-es.zip ./ # Now go build the site we actually want to deploy. - cd .. - git restore . # simulate the drive being inserted - mv simulated-usb-butter usb-butter - "sed -i 's/^baseurl.*/baseurl: \"\\/butter-box-ui\"/' _config.yml" - bundle exec jekyll build -d public # Now move the zip into the public dir so it gets served. - mv ./site-en.zip ./public/site-en.zip - mv ./site-es.zip ./public/site-es.zip - pwd - ls -la . artifacts: paths: - public only: - butter-box