Commit bad73d8b authored by Sripath Roy Koganti's avatar Sripath Roy Koganti

Update .gitlab-ci.yml

parent fd29da31
Pipeline #19894 failed with stage
in 1 minute and 53 seconds
# This file is a template, and might need editing before it works on your project.
# Official framework image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/node/tags/
# Using the node alpine image to build the React app
image: node:latest
# Pick zero or more services to be used on all builds.
# Only needed when using a docker container to run your tests in.
# Check out: http://docs.gitlab.com/ce/ci/docker/using_docker_images.html#what-is-a-service
services:
# This folder is cached between builds
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
# Announce the URL as per CRA docs
# https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#advanced-configuration
variables:
PUBLIC_URL: /water-cycle
# Cache node modules - speeds up future builds
cache:
paths:
- node_modules/
- node_modules
test_async:
script:
- npm install
- npm start
- node ./specs/start.js ./specs/async.spec.js
# Name the stages involved in the pipeline
stages:
- deploy
test_db:
# Job name for gitlab to recognise this results in assets for Gitlab Pages
# https://docs.gitlab.com/ee/user/project/pages/introduction.html#gitlab-pages-requirements
pages:
stage: deploy
script:
- npm install
- node ./specs/start.js ./specs/db-postgres.spec.js
- npm install # Install all dependencies
- npm run build --prod # Build for prod
- cp public/index.html public/404.html # Not necessary, but helps with https://medium.com/@pshrmn/demystifying-single-page-applications-3068d0555d46
- mv public _public # CRA and gitlab pages both use the public folder. Only do this in a build pipeline.
- mv build public # Move build files to public dir for Gitlab Pages
artifacts:
paths:
- public # The built files for Gitlab Pages to serve
only:
- master # Only run on master branch
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment