Auto deployment in Cloudflare workers for static code (react, angular, vanilla, html & css, ...)
We can't push a .env in the repo so, we need to add the environment variables
- export NODE_ENV=dev
- export REACT_APP_API_DOMAIN=$STAGING_REACT_APP_API_DOMAIN
- export REACT_APP_API_DOMAIN_V1=$STAGING_REACT_APP_API_DOMAIN_V1
Add the following lines to the bitbucket-pipelines.yml
step you want to configure
- npm i cloudflare-static-deployment
- npx deploy -e staging
- Configuration
- Dependencies
- Database configuration
- How to run tests
- Deployment instructions https://docs.google.com/spreadsheets/d/1ND0mAcpdiukd9Fc9LLPVUqPjM3LCicschcFlGQsSzQw/edit#gid=0
- Writing tests
- Code review
- Other guidelines
- Repo owner or admin
- Other community or team contact
add this in Workspace variables for bitbucket this way:
K8S_NODE_${i}=${port}
i.e.
K8S_NODE_1 = 1.1.1.1 K8S_NODE_2 = 1.1.1.2