# Overwrite App when deploying using github action

**URL:** <https://community.dynatrace.com/t/overwrite-app-when-deploying-using-github-action/49603>\
**Category:** Developer Q&A Forum\
**Tags:** dynatrace-app-toolkit, custom-app, coding-assistance\
**Created:** [January 7, 2025, 8:21pm UTC](https://community.dynatrace.com/t/overwrite-app-when-deploying-using-github-action/49603 "2025-01-07T20:21:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubois\_david](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dubois_david/32/28500_2.png) [@dubois\_david](https://community.dynatrace.com/u/dubois_david)\
**Post date:** [January 7, 2025, 8:21pm UTC](https://community.dynatrace.com/t/overwrite-app-when-deploying-using-github-action/49603/1 "2025-01-07T20:21:52Z")

</div>

I have written a github action to try to deploy our custom app when changes are made.&nbsp; When doing so I am being asked to choose whether I want to overwrite the existing app or not.&nbsp; Since this is automation I do not want to have this question pop up but instead wish it to automatically overwrite.

 ![deployapp.jpg](https://global.discourse-cdn.com/dynatrace/original/2X/9/95d5e66179873e4d7dac80d35bb90360878c8393.jpeg)

Is there a way to do this?

---

<div class="post-metadata">

**Author:** ![dubois\_david](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dubois_david/32/28500_2.png) [@dubois\_david](https://community.dynatrace.com/u/dubois_david)\
**Post date:** [January 7, 2025, 8:40pm UTC](https://community.dynatrace.com/t/overwrite-app-when-deploying-using-github-action/49603/2 "2025-01-07T20:40:08Z")

</div>

I determined if I use the command&nbsp;Run npx dt-app deploy --force-overwrite instead of npm run deploy the overwrite works.

---

<div class="post-metadata">

**Author:** ![christian\_kreuz](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/christian_kreuz/32/21669_2.png) [@christian\_kreuz](https://community.dynatrace.com/u/christian_kreuz)\
**Post date:** [January 10, 2025, 12:55pm UTC](https://community.dynatrace.com/t/overwrite-app-when-deploying-using-github-action/49603/3 "2025-01-10T12:55:19Z")

</div>

When trying to add parameters to “npm run”, you have to do say via adding an additional “--” in between, e.g.:

```python
npm run deploy -- --force-overwrite

```

See [npm-run-script | npm Docs](https://docs.npmjs.com/cli/v10/commands/npm-run-script) for details.

Alternatively, as you also mentioned in your comment bellow, you can use “dt-app deploy --force-overwrite”.

---

<div class="post-metadata">

**Author:** ![haris](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/haris/32/38293_2.png) [@haris](https://community.dynatrace.com/u/haris)\
**Post date:** [March 20, 2025, 2:13pm UTC](https://community.dynatrace.com/t/overwrite-app-when-deploying-using-github-action/49603/4 "2025-03-20T14:13:19Z")

</div>

Starting with 0.138.0, dt-app overwrites previously deployed apps by default without the need to provide cli parameter `--force-overwrite`. In fact dt-app now displays a warning if you try to use the `--force-overwrite` flag:

```language-
Warning ────────────────────────────────────────────────────────────────────────────────────────
  The --force-overwrite flag is deprecated. Apps, deployed by other users, are now overwritten by default
────────────────────────────────────────────────────────────────────────────────────────────────

```
