I have two folders in my bitbucket repository but I want to deploy the contents of only the back-end folder to heroku. I tried this
script:
- cp ./front-end/dist ./back-end -r
- cp ./front-end/index.html ./back-end
- rm -rf front-end
- mv back-end/* .
- ls -Al
- rm back-end -rf
- git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git HEAD
But I still get this error
+ git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git HEAD
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/nodejs.tgz
remote: Node.js: package.json not found in application root
remote:
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
But the ls -Al logs
total 144
drwxrwxrwx. 8 root root 4096 Sep 25 12:35 .git
drwxrwxrwx. 2 root root 4096 Sep 25 12:35 back-end
drwxrwxrwx. 2 root root 4096 Sep 25 12:35 bin
-rw-rw-rw-. 1 root root 1617 Sep 25 12:35 bitbucket-pipelines.yml
drwxrwxrwx. 2 root root 4096 Sep 25 12:35 controllers
-rwxrwxrwx. 1 root root 1223 Sep 25 12:35 data.json
drwxr-xr-x. 4 root root 4096 Sep 25 12:35 dist
-rwxr-xr-x. 1 root root 2634 Sep 25 12:35 index.html
drwxrwxrwx. 2 root root 4096 Sep 25 12:35 models
-rw-rw-rw-. 1 root root 85391 Sep 25 12:35 package-lock.json
-rw-rw-rw-. 1 root root 611 Sep 25 12:35 package.json
-rwxrwxrwx. 1 root root 563 Sep 25 12:35 readme.md
drwxrwxrwx. 2 root root 4096 Sep 25 12:35 routes
-rw-rw-rw-. 1 root root 1024 Sep 25 12:35 server.js
drwxrwxrwx. 2 root root 4096 Sep 25 12:35 test
-rw-rw-rw-. 1 root root 886 Sep 25 12:35 utils.js
How do I make this work?
Hi Ekene,
Since this is a duplicate question, I'll redirect you (and any future viewers) here: https://community.atlassian.com/t5/Bitbucket-questions/How-to-push-select-files-to-heroku-with-pipeline/qaq-p/899716#U905113
Thanks,
Phil
From setup to deployment—this learning path shows you how to build your first app using Forge. Learn the essentials, streamline workflows, and bring custom solutions to life across Jira, Confluence, and more.
Start Learning
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.