# Deploy compiled typescript/node folder to heroku?

**URL:** <https://discuss.circleci.com/t/deploy-compiled-typescript-node-folder-to-heroku/10278>\
**Category:** Deployments\
**Tags:** nodejs, heroku, circle-yml\
**Created:** [February 10, 2017, 5:30am UTC](https://discuss.circleci.com/t/deploy-compiled-typescript-node-folder-to-heroku/10278 "2017-02-10T05:30:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jnystrom](https://avatars.discourse-cdn.com/v4/letter/j/c2a13f/32.png) [@jnystrom](https://discuss.circleci.com/u/jnystrom)\
**Post date:** [February 10, 2017, 5:30am UTC](https://discuss.circleci.com/t/deploy-compiled-typescript-node-folder-to-heroku/10278/1 "2017-02-10T05:30:22Z")

</div>

My node project is written in Typescript. Circle CI builds by typescript code and pushes the JS files into a lib folder. I would like this lib folder deployed to heroku. Currently this folder is not getting deployed to heroku, only the original source files/folders. Travis-Ci has a property called `skip_cleanup` that keeps the compiled folder around and pushes it to heroku. What can I do in Circle for this to work???

---

<div class="post-metadata">

**Author:** ![tom](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/tom/32/27680_2.png) [@tom](https://discuss.circleci.com/u/tom)\
**Post date:** [February 14, 2017, 3:55pm UTC](https://discuss.circleci.com/t/deploy-compiled-typescript-node-folder-to-heroku/10278/2 "2017-02-14T15:55:16Z")

</div>

The expected workflow for our Heroku integration is as follows:

- push a commit
- CircleCI runs your tests
- if they pass push the passing commit to Heroku
- Heroku compiles your app using a buildpack. Here’s a buildpack for TypeScript: [https://github.com/pk11/heroku-buildpack-typescript](https://github.com/pk11/heroku-buildpack-typescript) that could be useful in this case.

Here’s [a guide](https://medium.com/@Roaders/deploying-a-node-and-browser-typescript-project-to-heroku-3e647ef74c82#.vwosv0id9) for compiling TypeScript on Heroku.

It is possible to get CircleCI to deploy compiled code to Heroku, but it’s not supported by our built-in integration since this isn’t the usual workflow. This section of the docs explains how you can manually run commands in the deployment section: [https://circleci.com/docs/continuous-deployment-with-heroku/#pre-or-post](https://circleci.com/docs/continuous-deployment-with-heroku/#pre-or-post) You can run any valid shell commands in the `commands` section (or even call a script) so what you can do there is very flexible.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [June 18, 2018, 11:41am UTC](https://discuss.circleci.com/t/deploy-compiled-typescript-node-folder-to-heroku/10278/3 "2018-06-18T11:41:11Z")

</div>


