I have the following pipeline script for my express and react application:
image: node:10.15.3
pipelines:
default:
- step:
name: Installing API server dependencies
script:
- npm install
- step:
name: Install client dependencies & build
script:
- cd client
- npm install
- npm run build
- step:
name: Create artifact
script:
- git archive --format=tar.gz master -o application.tar.gz
artifacts:
- application.tar.gz
- step:
name: Deploy to test
deployment: test
script:
- pipe: atlassian/heroku-deploy:0.1.1
variables:
HEROKU_API_KEY: $HEROKU_API_KEY
HEROKU_APP_NAME: $HEROKU_APP_NAME
ZIP_FILE: application.tar.gz
However, when the ZIP file application.tar.gz is passed to Heroku, the deployment is successful but the build folder is missing from it when I list the contents. It's almost like the step: Install client dependencies & build has had no effect, but it does run and the logs show everything I would expect to create a production build of the react app.