Pushing only built app to Heroku while not tracking it with Git

I'm working on a React / Node project and I need to compile the code before pushing it to Heroku for optimal deployment. At the same time I don't want to track the build/ folder with Git for obvious reasons.

I added the build/ folder to .gitignore but now I don't know what's a good way to push only the necessary files for Heroku.