Commit 0e8472e5 authored by Karakas's avatar Karakas
Browse files

Update .gitlab-ci.yml file

parent 616ad661
Pipeline #9165 passed with stages
in 58 seconds
# This file is a template, and might need editing before it works on your project.
# To contribute improvements to CI/CD templates, please follow the Development guide at:
# https://docs.gitlab.com/ee/development/cicd/templates.html
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Nodejs.gitlab-ci.yml
# Official framework image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/node/tags/
image: node:latest
image: node:18 # Use Node.js image for the pipeline
stages:
- build
- deploy
# This folder is cached between builds
# https://docs.gitlab.com/ee/ci/yaml/index.html#cache
cache:
# Define jobs
build:
stage: build
script:
- cd frontend # Change directory to the frontend folder
- npm install # Install dependencies
- npm run build # Build the React application
artifacts:
paths:
- frontend/node_modules/
- frontend/build/ # Specify the artifacts to be passed to the next stage
pages:
deploy:
stage: deploy
script:
- cd frontend
- npm install
- npm run start
- echo "Deploying to https://transfer.hft-stuttgart.de/pages/$CI_PROJECT_PATH/"
artifacts:
paths:
- frontend/public
- echo "deploy to https://transfer.hft-stuttgart.de/pages/$CI_PROJECT_PATH/"
# Add your deployment script here, for example:
# - scp -r frontend/build/* user@your-server:/path/to/deploy
only:
- master
- master # Deploy only when changes are pushed to the 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