CI to build javascript/css

This commit is contained in:
Deon George 2023-03-26 00:16:42 +11:00
parent dd17873905
commit 61202d3617
3 changed files with 8 additions and 2 deletions

View File

@ -5,8 +5,10 @@ stages:
# This folder is cached between builds
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
cache:
key: ${CI_JOB_NAME_SLUG}-${CI_COMMIT_REF_SLUG}
key: ${CI_COMMIT_REF_SLUG}
paths:
- public/
- node_modules/
- vendor/
include:

View File

@ -17,7 +17,7 @@ docker:
script:
- if [ -f init ]; then chmod 500 init; fi
- echo -n ${CI_COMMIT_SHORT_SHA} > VERSION
- rm -rf vendor/ database/schema database/seeders database/factories/*
- rm -rf node_modules database/seeds database/schema database/factories/*
- docker build -f docker/Dockerfile -t ${CI_REGISTRY_IMAGE}:${VERSION} .
- docker push ${CI_REGISTRY_IMAGE}:${VERSION}
tags:

View File

@ -28,6 +28,10 @@ test:
before_script:
- mv .env.testing .env
# Install npm and dependancies
- npm i
- npm run prod
# Install Composer and project dependencies.
- mkdir -p ${COMPOSER_HOME}
- if [ -n "$GITHUB_TOKEN" ]; then cat $GITHUB_TOKEN |base64 -d > ${COMPOSER_HOME}/auth.json; fi