From 798fc5b60bf95ae336f1fd469853a72db44ecfce Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Fri, 31 May 2024 21:10:51 +0200 Subject: CI: Make the 'pages' job succeed And also run it on all branches rather than just 'master'. This makes it work as a basic sanity check to make sure that the 'yarn deploy' step runs without errors. Also changed it to run on node:12-buster, to match the version of Node currently used in production. --- .gitlab-ci.yml | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6a0a95e..e08309a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,30 +1,16 @@ before_script: - uname -a -image: node:16-buster pages: # the job must be named pages - image: node:16-buster + image: node:12-buster stage: deploy script: - - rm -rf node_modules - - rm -rf */node_modules - - npm install yarn - - echo $PATH - - export PATH="$(yarn global bin):$PATH" - - echo $PATH - - yarn global add @vue/cli + - npm install --no-package-lock yarn - yarn install - - vue --version - - npm i -g @vue/cli-service - - yarn build - yarn deploy - rm -rf public - - mkdir -p public - - mv dist/* public # rename the dist folder (result of npm run build) - - find public/ + - mv dist public + - find public artifacts: paths: - public # artifact path must be /public for GitLab Pages to pick it up - only: - - master - -- cgit v1.2.3-70-g09d2