Skip to content

Instantly share code, notes, and snippets.

@anlisha-maharjan
Created November 2, 2022 04:59
Show Gist options
  • Save anlisha-maharjan/c61768786db3d4b4387433dd929137a8 to your computer and use it in GitHub Desktop.
Save anlisha-maharjan/c61768786db3d4b4387433dd929137a8 to your computer and use it in GitHub Desktop.
The bitbucket-pipelines.yml defines Pipelines builds configuration for React application.
#bitbucket-pipelines.yml
image: node:14.0.0
pipelines:
branches:
master:
- step:
name: Build React (Prod Server)
script:
- npm cache clean --force
- rm -rf node_modules
- npm install
- cp .env.prod.example .env
- whoami
- npm run build
artifacts:
- build/**
- step:
name: Deployment (Prod Server)
deployment: Production
script:
- pipe: atlassian/rsync-deploy:0.6.0
variables:
USER: $PROD_USER
SERVER: $PROD_SERVER
REMOTE_PATH: '${PROD_REMOTE_DESTINATION_PATH}'
LOCAL_PATH: '${PROD_BUILD_FOLDER}'
- echo -e "Have a good day!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment