Created
November 2, 2022 04:59
-
-
Save anlisha-maharjan/c61768786db3d4b4387433dd929137a8 to your computer and use it in GitHub Desktop.
The bitbucket-pipelines.yml defines Pipelines builds configuration for React application.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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