I'm new to bitbucket pipelines and I'm following this tutorial to deploy a react app to heroku.
Deploy Reactjs app to Heroku with Multi-Environment Bitbucket CI/CD pipeline
However the file bitbucket-pipelines.yml seems to be incorrect.
Can anyone tell me what's wrong, and kindly help me to correct it?
Many thanks.
image: node:14.18.0
pipelines:
branches:
main:
- step:
name: Create artifacts
script:
- git archive --format=tar.gz main -o application.tar.gz
artifacts:
- application.tar.gz
- step:
name: Deploy to production
deployment: main
caches:
- node
script:
- pipe: atlassian/heroku-deploy:1.2.1
variables:
HEROKU_API_KEY: $HEROKU_API_KEY
ZIP_FILE: application.tar.gz
develop:
- step:
name: Create artifacts
script:
- git archive --format=tar.gz main -o application.tar.gz
artifacts:
- application.tar.gz
- step:
name: Deploy to production
deployment: main
caches:
- node
script:
- pipe: atlassian/heroku-deploy:1.2.1
variables:
HEROKU_API_KEY: $HEROKU_API_KEY
ZIP_FILE: application.tar.gz
default:
PS: A screenshot showing the errors that VSCode points out

