From fc5f939ee44e16f9e251c52d115a76c38624a38c Mon Sep 17 00:00:00 2001 From: David O'Regan <davidoregan@Davids-MacBook-Pro.local> Date: Wed, 23 Nov 2022 16:13:22 +1100 Subject: [PATCH] Add gitlab CI YML file --- .gitlab-ci.yml | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..83fe341 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,48 @@ +image: ruby:2.6 + +cache: + paths: + - vendor + +test: + script: + - apt-get update -yqqq + - curl -sL https://deb.nodesource.com/setup_12.x | bash - + - curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - + - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list + - apt update + - apt-get install -y nodejs yarn + - export GEM_HOME=$PWD/gems + - export PATH=$PWD/gems/bin:$PATH + - gem install bundler + - gem install bridgetown -N + - bundle install + - yarn install + - yarn webpack --mode production + - bin/bridgetown build --base_path mysite --url https://bridgetownrb.gitlab.io + - bin/bridgetown clean + except: + - main + +pages: + script: + - apt-get update -yqqq + - curl -sL https://deb.nodesource.com/setup_12.x | bash - + - curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - + - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list + - apt update + - apt-get install -y nodejs yarn + - export GEM_HOME=$PWD/gems + - export PATH=$PWD/gems/bin:$PATH + - gem install bundler + - gem install bridgetown -N + - bundle install + - yarn install + - yarn webpack --mode production + - bin/bridgetown build --base_path mysite --url https://bridgetownrb.gitlab.io + - mv output public + artifacts: + paths: + - public + only: + - main -- GitLab