image: node:18 # Use Node.js image for the pipeline stages: - build - deploy # 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/build/ # Specify the artifacts to be passed to the next stage 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