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. image: node:18 # Use Node.js image for the pipeline
# 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
stages: stages:
- build
- deploy - deploy
# Define jobs
# This folder is cached between builds build:
# https://docs.gitlab.com/ee/ci/yaml/index.html#cache stage: build
cache:
paths:
- frontend/node_modules/
pages:
stage: deploy
script: script:
- cd frontend - cd frontend # Change directory to the frontend folder
- npm install - npm install # Install dependencies
- npm run start - npm run build # Build the React application
- echo "Deploying to https://transfer.hft-stuttgart.de/pages/$CI_PROJECT_PATH/"
artifacts: artifacts:
paths: paths:
- frontend/public - frontend/build/ # Specify the artifacts to be passed to the next stage
only:
- master
deploy:
stage: deploy
script:
- 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 # 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