# How do I run \`deploy\`, \`before\_deploy\`, and \`after\_deploy\` in debug mode?

**URL:** https://travis-ci.community/t/how-do-i-run-deploy-before-deploy-and-after-deploy-in-debug-mode/4916
**Category:** Travis CI Discussions & Feedback
**Created:** [August 28, 2019, 4:30pm UTC](https://travis-ci.community/t/how-do-i-run-deploy-before-deploy-and-after-deploy-in-debug-mode/4916 "2019-08-28T16:30:55Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![chansiky](https://avatars.discourse-cdn.com/v4/letter/c/cc9497/32.png) [@chansiky](https://travis-ci.community/u/chansiky)
#### Post date: [August 28, 2019, 4:30pm UTC](https://travis-ci.community/t/how-do-i-run-deploy-before-deploy-and-after-deploy-in-debug-mode/4916/1 "2019-08-28T16:30:55Z")

</div>

So I’m looking through the docs for running a build in [debug mode](https://docs.travis-ci.com/user/running-build-in-debug-mode), and I got to the portion on [Things to do once you are inside the debug VM](https://docs.travis-ci.com/user/running-build-in-debug-mode/#things-to-do-once-you-are-inside-the-debug-vm). I don’t see anywhere how I could run the `deploy`, `before_deploy`, and `after_deploy` scripts.

Is there a way to run the commands and start up the deployment in the `travis.yml` file?

---

<div class="post-metadata">

### Author: ![legoscia](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/legoscia/32/8899_2.png) [@legoscia](https://travis-ci.community/u/legoscia)
#### Post date: [September 11, 2023, 10:46am UTC](https://travis-ci.community/t/how-do-i-run-deploy-before-deploy-and-after-deploy-in-debug-mode/4916/2 "2023-09-11T10:46:59Z")

</div>

You can use `travis_run_after_success` to run the deploy script. I found this by looking at everything that starts with `travis_run` - I’m not sure this is documented anywhere.
