# Trigger Heroku build even if there are no code changes

**URL:** <https://discuss.circleci.com/t/trigger-heroku-build-even-if-there-are-no-code-changes/38144>\
**Category:** Deployments\
**Tags:** heroku, circle-yml\
**Created:** [November 16, 2020, 10:55pm UTC](https://discuss.circleci.com/t/trigger-heroku-build-even-if-there-are-no-code-changes/38144 "2020-11-16T22:55:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![harrygothold](https://avatars.discourse-cdn.com/v4/letter/h/cc9497/32.png) [@harrygothold](https://discuss.circleci.com/u/harrygothold)\
**Post date:** [November 16, 2020, 10:55pm UTC](https://discuss.circleci.com/t/trigger-heroku-build-even-if-there-are-no-code-changes/38144/1 "2020-11-16T22:55:15Z")

</div>

I have the following yml file  
version: 2.1  
jobs:  
build:  
docker:  
- image: circleci/node:13.12.0  
working\_directory: ~/repo  
steps:  
- checkout  
- run:  
name: update npm  
command: ‘sudo npm install -g npm@latest’  
- restore\_cache:  
key: dependency-cache-{{ checksum “package.json” }}  
- run:  
name: Install node modules  
command: npm install  
- run:  
name: Build  
command: npm run build  
- save\_cache:  
key: dependency-cache-{{ checksum “package.json” }}  
paths:  
- ./node\_modules  
- run:  
name: Deploy Master to Heroku  
command: |  
git push [https://heroku:$HEROKU\_API\_KEY@git.heroku.com/$HEROKU\_APP\_NAME.git](https://heroku:%24HEROKU_API_KEY@git.heroku.com/%24HEROKU_APP_NAME.git) master:main -f

This pipeline is set up to be triggered by changes in Contentful CMS, however, because there are no code changes, the build stops and says “Everything is up to date”. Is there someway where I can forcibly run a Heroku build even if there is no code changes?

---

<div class="post-metadata">

**Author:** ![Henna](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/henna/32/29402_2.png) [@Henna](https://discuss.circleci.com/u/Henna)\
**Post date:** [November 18, 2020, 11:03pm UTC](https://discuss.circleci.com/t/trigger-heroku-build-even-if-there-are-no-code-changes/38144/2 "2020-11-18T23:03:29Z")

</div>

Hi @harrygothold,

I am looking at contentful’s docs here: [https://www.contentful.com/developers/docs/ruby/tutorials/automated-rebuild-and-deploy-with-circleci-and-webhooks/](https://www.contentful.com/developers/docs/ruby/tutorials/automated-rebuild-and-deploy-with-circleci-and-webhooks/)  
It looks like a build is triggered via contentful using CircleCI’s API anytime a change is made. You should be able to trigger a heroku build if you re-run you build from within CircleCI’s UI.

You can leverage CircleCI’s API to trigger a pipeline: [https://circleci.com/docs/api/v2/#operation/triggerPipeline](https://circleci.com/docs/api/v2/#operation/triggerPipeline)

You can also use [tag filtering](https://circleci.com/docs/2.0/configuration-reference/#tags) to trigger a job or workflow when a commit is tagged.

Lastly, you could [schedule a workflow](https://circleci.com/docs/2.0/workflows/#scheduling-a-workflow) to deploy automatically.

Please feel free to provide additional details or a build link if there is anything I missed.
