title: App crashing right away after deploy from Github Actions
body: <p>Well, I have pushed my TypeScript project to github, and it has these scripts:</p>
  <pre class="lang-json prettyprint-override"><code>&quot;scripts&quot;: {
      &quot;test&quot;: &quot;jest&quot;,
      &quot;test:cov&quot;: &quot;jest --coverage -i&quot;,
      &quot;test:unit&quot;: &quot;jest unit --coverage -i&quot;,
      &quot;test:int&quot;: &quot;jest int --coverage -i&quot;,
      &quot;build&quot;: &quot;rimraf ./dist &amp;&amp; tsc&quot;,
      &quot;start&quot;: &quot;node ./dist/index.js&quot;,
      &quot;dev&quot;: &quot;ts-node-dev --respawn --transpile-only --inspect -- ./src/index.ts&quot;
    }
  </code></pre>
  <p>After that, I created a github action workflow, making it run my tests and if they all pass, it deploys to heroku, but when the deployment is made, the heroku app crashes instantly.</p>
  <p>This is the workflow:
  <code>main.yml</code>:</p>
  <pre class="lang-yaml prettyprint-override"><code>name: Main workflow
  on:
    pull_request:
      branches:
        - main
    push:
      branches:
        - main
  jobs:
    build:
      runs-on: ubuntu-latest
      strategy:
        matrix:
          node-version: [14.18.1]
  
      steps:
        - uses: actions/checkout@v2
  
        - name: Use Node.js ${{ matrix.node-version }}
          uses: actions/setup-node@v2.4.1
          with:
            node-version: ${{ matrix.node-version }}
        - name: Install deps
          run: yarn --frozen-lockfile
        - name: Test
          env:
            MONGODB_URL_TEST: ${{secrets.MONGODB_URL_TEST}}
            AUTH_TOKEN: ${{secrets.AUTH_TOKEN}}
          run: yarn test
        - name: Build the project
          run: yarn build
        - name: Deploy the project
          if: ${{github.ref == 'refs/heads/main'}}
          uses: akhileshns/heroku-deploy@v3.12.12
          with:
            heroku_api_key: ${{secrets.HEROKU_API_KEY}}
            heroku_app_name: &quot;testjvcapi&quot;
            heroku_email: &quot;joaovitorcasarin@hotmail.com&quot;
          env:
            HD_MONGODB_URL: ${{secrets.MONGODB_URL}}
            HD_AUTH_TOKEN: ${{secrets.AUTH_TOKEN}}
  </code></pre>
  <p>This is the last action that I triggered: <a href="https://github.com/joaocasarin/test-selfapi/actions/runs/1365239970" rel="nofollow noreferrer">https://github.com/joaocasarin/test-selfapi/actions/runs/1365239970</a></p>
  <p>This is the repo: <a href="https://github.com/joaocasarin/test-selfapi/" rel="nofollow noreferrer">https://github.com/joaocasarin/test-selfapi/</a></p>
  <p>This is the log after the deployment to heroku:</p>
  <pre class="lang-sh prettyprint-override"><code>2021-10-20T20:33:33.000000+00:00 app[api]: Build started by user *****@hotmail.com
  2021-10-20T20:34:16.052764+00:00 app[api]: Release v6 created by user *****@hotmail.com
  2021-10-20T20:34:16.052764+00:00 app[api]: Deploy 1192ce7c by user *****@hotmail.com
  2021-10-20T20:34:16.359307+00:00 heroku[web.1]: State changed from crashed to starting
  2021-10-20T20:34:18.914264+00:00 heroku[web.1]: Starting process with command `npm start`
  2021-10-20T20:34:20.660465+00:00 app[web.1]: [heroku-exec] Starting
  2021-10-20T20:34:20.956196+00:00 app[web.1]:
  2021-10-20T20:34:20.956213+00:00 app[web.1]: &gt; self-api@1.0.0 start /app
  2021-10-20T20:34:20.956214+00:00 app[web.1]: &gt; node ./dist/index.js
  2021-10-20T20:34:20.956214+00:00 app[web.1]:
  2021-10-20T20:34:21.713756+00:00 app[web.1]: Listening on port 8260
  2021-10-20T20:34:21.775734+00:00 heroku[web.1]: State changed from starting to up
  2021-10-20T20:34:21.911902+00:00 app[web.1]: npm ERR! code ELIFECYCLE
  2021-10-20T20:34:21.912248+00:00 app[web.1]: npm ERR! errno 1
  2021-10-20T20:34:21.926340+00:00 app[web.1]: npm ERR! self-api@1.0.0 start: `node ./dist/index.js`
  2021-10-20T20:34:21.926408+00:00 app[web.1]: npm ERR! Exit status 1
  2021-10-20T20:34:21.926490+00:00 app[web.1]: npm ERR!
  2021-10-20T20:34:21.926548+00:00 app[web.1]: npm ERR! Failed at the self-api@1.0.0 start script.
  2021-10-20T20:34:21.926604+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  2021-10-20T20:34:21.933864+00:00 app[web.1]:
  2021-10-20T20:34:21.933977+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
  2021-10-20T20:34:21.934035+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2021-10-20T20_34_21_928Z-debug.log
  2021-10-20T20:34:22.121378+00:00 heroku[web.1]: Process exited with status 1
  2021-10-20T20:34:22.265731+00:00 heroku[web.1]: State changed from up to crashed
  2021-10-20T20:34:22.288685+00:00 heroku[web.1]: State changed from crashed to starting
  2021-10-20T20:34:24.000000+00:00 app[api]: Build succeeded
  2021-10-20T20:34:24.543897+00:00 heroku[web.1]: Starting process with command `npm start`
  2021-10-20T20:34:25.605048+00:00 app[web.1]: [heroku-exec] Starting
  2021-10-20T20:34:25.900511+00:00 app[web.1]:
  2021-10-20T20:34:25.900518+00:00 app[web.1]: &gt; self-api@1.0.0 start /app
  2021-10-20T20:34:25.900518+00:00 app[web.1]: &gt; node ./dist/index.js
  2021-10-20T20:34:25.900519+00:00 app[web.1]:
  2021-10-20T20:34:26.661060+00:00 app[web.1]: Listening on port 33178
  2021-10-20T20:34:26.671025+00:00 app[web.1]: npm ERR! code ELIFECYCLE
  2021-10-20T20:34:26.674395+00:00 app[web.1]: npm ERR! errno 1
  2021-10-20T20:34:26.676324+00:00 app[web.1]: npm ERR! self-api@1.0.0 start: `node ./dist/index.js`
  2021-10-20T20:34:26.676389+00:00 app[web.1]: npm ERR! Exit status 1
  2021-10-20T20:34:26.676462+00:00 app[web.1]: npm ERR!
  2021-10-20T20:34:26.676511+00:00 app[web.1]: npm ERR! Failed at the self-api@1.0.0 start script.
  2021-10-20T20:34:26.676557+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  2021-10-20T20:34:26.682667+00:00 app[web.1]:
  2021-10-20T20:34:26.682776+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
  2021-10-20T20:34:26.682829+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2021-10-20T20_34_26_677Z-debug.log
  2021-10-20T20:34:26.877812+00:00 heroku[web.1]: Process exited with status 1
  2021-10-20T20:34:27.141848+00:00 heroku[web.1]: State changed from starting to crashed
  </code></pre>
  <p>Can someone please give me a light? This is the first time I try github actions.</p>
  <p>Thanks</p>
  <p>Edit.: This is the <code>Deploy the project</code> step information:</p>
  <pre class="lang-sh prettyprint-override"><code>Run akhileshns/heroku-deploy@v3.12.12
  Created and wrote to ~/.netrc
  Successfully logged into heroku
   ›   Warning: Our terms of service have changed: 
   ›   https://dashboard.heroku.com/terms-of-service
  Added git remote heroku
  Setting MONGODB_URL, AUTH_TOKEN and restarting testjvcapi... done, v5
  remote: Compressing source files... done.        
  remote: Building source:        
  remote: 
  remote: -----&gt; Building on the Heroku-20 stack        
  remote: -----&gt; Using buildpack: heroku/nodejs        
  remote: -----&gt; Node.js app detected        
  remote:                
  remote: -----&gt; Creating runtime environment        
  remote:                
  remote:        NPM_CONFIG_LOGLEVEL=error        
  remote:        USE_YARN_CACHE=true        
  remote:        NODE_VERBOSE=false        
  remote:        NODE_ENV=production        
  remote:        NODE_MODULES_CACHE=true        
  remote:                
  remote: -----&gt; Installing binaries        
  remote:        engines.node (package.json):  unspecified        
  remote:        engines.npm (package.json):   unspecified (use default)        
  remote:        engines.yarn (package.json):  unspecified (use default)        
  remote:                
  remote:        Resolving node version 14.x...        
  remote:        Downloading and installing node 14.18.1...        
  remote:        Using default npm version: 6.14.15        
  remote:        Resolving yarn version 1.22.x...        
  remote:        Downloading and installing yarn (1.22.17)        
  remote:        Installed yarn 1.22.17        
  remote:                
  remote: -----&gt; Restoring cache        
  remote:        - yarn cache        
  remote:                
  remote: -----&gt; Installing dependencies        
  remote:        Installing node modules (yarn.lock)        
  remote:        yarn install v1.22.17        
  remote:        [1/4] Resolving packages...        
  remote:        [2/4] Fetching packages...        
  remote:        [3/4] Linking dependencies...        
  remote:        [4/4] Building fresh packages...        
  remote:        Done in 7.59s.        
  remote:                
  remote: -----&gt; Build        
  remote:        Running build (yarn)        
  remote:        yarn run v1.22.17        
  remote:        $ rimraf ./dist &amp;&amp; tsc        
  remote:        Done in 11.61s.        
  remote:                
  remote: -----&gt; Pruning devDependencies        
  remote:        yarn install v1.22.17        
  remote:        [1/4] Resolving packages...        
  remote:        [2/4] Fetching packages...        
  remote:        [3/4] Linking dependencies...        
  remote:        [4/4] Building fresh packages...        
  remote:        warning Ignored scripts due to flag.        
  remote:        Done in 3.65s.        
  remote:                
  remote: -----&gt; Caching build        
  remote:        - yarn cache        
  remote:                
  remote: -----&gt; Build succeeded!        
  remote: -----&gt; Discovering process types        
  remote:        Procfile declares types     -&gt; (none)        
  remote:        Default types for buildpack -&gt; web        
  remote: 
  remote: -----&gt; Compressing...        
  remote:        Done: 41.9M        
  remote: -----&gt; Launching...        
  remote:        Released v6        
  remote:        https://testjvcapi.herokuapp.com/ deployed to Heroku        
  remote: 
  remote: Verifying deploy... done.        
  To https://git.heroku.com/testjvcapi.git
     f9075d9..1192ce7  HEAD -&gt; main
  </code></pre>