I hope you are doing well! I'm facing a problem when trying to deploy using Bitbucket pipeline.
The project is a React project at version 18.2.0 and its files are in the frontend folder.
bitbucket-pipelines.yml
image: atlassian/default-image:3
# Workflow Configuration
pipelines:
branches:
staging:
- parallel:
- step:
name: Build and Test
script:
- npm install --prefix ./frontend/ --legacy-peer-deps
- npm audit fix --force --prefix ./frontend/
- npm audit fix --force --prefix ./frontend/
- npm run build --prefix ./frontend/
artifacts:
- ./frontend/build/**
- step:
name: Deploy to Staging
deployment: Staging
script:
- pipe: atlassian/scp-deploy:0.3.3
variables:
USER: $USER
SERVER: $SERVER
REMOTE_PATH: '/var/www/html'
LOCAL_PATH: './'
The error that I am not able to solve is related to the LOCAL_PATH folder.
I tried some variations:
./frontend/build/*
- No such file or directory
./build/*
- No such file or directory
./
- error: unexpected filename: .
Thanks in advance for any help