Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Filipe Sousa 43 posts 205 karma points
    Mar 15, 2019 @ 23:58
    Filipe Sousa
    0

    Umbraco Cloud deploy event

    Hi guys,

    I'd like to run some code in my Umbraco website whenever a deployment happens but I only found two ways to do it which are not ideal:

    1. Override ApplicationStarted event and force a restart by changing some dll or config file when deploying.
    2. Use the deploy webhook to call some page on the website which would run this code.

    Is there a way of umbraco being aware it's been deployed such as an event?

    Many thanks

  • Søren Gregersen 441 posts 1884 karma points MVP 2x c-trib
    Mar 16, 2019 @ 05:31
    Søren Gregersen
    1

    Go with the webhook. That is why it’s there.

    Other solutions would be hacks, like a marker file that is deleted (like in modelsbuilder), or webconfig settings being changed.

    What code are you trying to run on/after deploy?

  • Filipe Sousa 43 posts 205 karma points
    Mar 18, 2019 @ 22:21
    Filipe Sousa
    0

    Hi Søren,

    thanks for the feedback.

    I'm changing some node's templates and I have it working pretty well using the web hook.

    Cheers

Please Sign in or register to post replies

Write your reply to:

Draft