---
title: "Discussion on \"How To Use GitHub Actions for Deployments When Following Trunk-Based Development\" | Hashnode"
description: "Discussion on \"How To Use GitHub Actions for Deployments When Following Trunk-Based Development\". Creating a CI/CD pipeline with GitHub Actions and trunk-based development can be challenging without advanced techniques"
url: "https://hashnode.com/posts/github-actions-trunk-based-development/639969d1eddf26a61b5cba36"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How To Use GitHub Actions for Deployments When Following Trunk-Based Development](https://wempe.dev/blog/github-actions-trunk-based-development?utm_source=hashnode&utm_medium=feed)

Creating a CI/CD pipeline with GitHub Actions and trunk-based development can be challenging without advanced techniques

Dec 14, 2022 · 9 min read · wempe.dev  
Updated Feb 6, 2024  
Read the article

-   [#github](https://hashnode.com/tag/github)
-   [#ci-cd](https://hashnode.com/tag/ci-cd)
-   [#devops](https://hashnode.com/tag/devops)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#aws](https://hashnode.com/tag/aws)
-   [#github-actions](https://hashnode.com/tag/github-actions)

## Written by

[Jannik Wempe](https://hashnode.com/@JannikWempe)

@JannikWempe · Hamburg, Germany

  
[View profile](https://hashnode.com/@JannikWempe)

Platform Engineering Lead @hashnode | Serverless and Frontend Enthusiast

Platform Engineering Lead @hashnode Serverless and Frontend Enthusiast 🤓 Into AWS, TypeScript, React, Svelte and upcoming trends… ☁️ AWS Community Builder Serverless Coding is not only a job – it's a passion. Based in Hamburg 🇩🇪

## Responses 5

Markdown supported · ⌘↵ to post

[Mathieu Lemaire](https://hashnode.com/@maz514)

[Jan 10, 2024](https://hashnode.com/posts/github-actions-trunk-based-development/639969d1eddf26a61b5cba36/comment/659ea2c231706e5871c3842a)

Hello there - thank you very much for the detailed steps 💯. Applied this on my repo (the manual steps with draft releases) but now I am facing a purist issue: how do you deal with draft releases that never get published?

[Jannik Wempe](https://hashnode.com/@JannikWempe)

[Jan 10, 2024](https://hashnode.com/posts/github-actions-trunk-based-development/639969d1eddf26a61b5cba36/comment/659ea2c231706e5871c3842a#reply-659ea357eae515b2608f56c1)

Hey, happy that it was helpful.

I don't care and let them sit there, to be honest. I imagine you could create another action running on a CRON that cleans them up. But the cost-benefit-ratio isn't there for me.

[Vamsi Rao](https://hashnode.com/@vamsirao)

[Sep 15, 2023](https://hashnode.com/posts/github-actions-trunk-based-development/639969d1eddf26a61b5cba36/comment/65044ef6dbce26f1baf9e5ab)

This is a really helpful article, bookmarked it :)

[Azamat Kurbanaev](https://hashnode.com/@azkurban)

[Sep 11, 2023](https://hashnode.com/posts/github-actions-trunk-based-development/639969d1eddf26a61b5cba36/comment/64ff8afe703e32bdbc1d1200)

This article provides a great detailed explanation to get familiar with the subject. Thank you!

[Jannik Wempe](https://hashnode.com/@JannikWempe)

[Sep 12, 2023](https://hashnode.com/posts/github-actions-trunk-based-development/639969d1eddf26a61b5cba36/comment/64ff8afe703e32bdbc1d1200#reply-64fffe9c703e32bdbc1d1949)

Happy to hear that it is useful 😊 Thanks.

[Giovanni Silva](https://hashnode.com/@giovannicandido)

[Jul 2, 2023](https://hashnode.com/posts/github-actions-trunk-based-development/639969d1eddf26a61b5cba36/comment/64a0e33a2eab00c6bef06ce2)

I'm migrating circleci pipelines to github actions because I was mixing then to get more github events triggering the pipelines in circleci and it was geting complicated. I start paying for github anyway so I want to keep everything in one place. Was thinking on ways to integrate the tag and releases feature in a pipeline with staging and production env, and your article give me a good starting point. Thanks for sharing, good points for new comes in github actions and experienced in other ci/cd

[Jannik Wempe](https://hashnode.com/@JannikWempe)

[Jul 2, 2023](https://hashnode.com/posts/github-actions-trunk-based-development/639969d1eddf26a61b5cba36/comment/64a0e33a2eab00c6bef06ce2#reply-64a116ae2eab00c6bef07089)

Happy to hear that, Giovanni.

We are currently using this approach for some of our deployments at Hashnode. It also works in a monorepo setup.

Let us know if you have any interesting modifications and different approaches 👍🏼

[Sebastian Ball](https://hashnode.com/@sebbeldev)

[Dec 14, 2022](https://hashnode.com/posts/github-actions-trunk-based-development/639969d1eddf26a61b5cba36/comment/63998302a6e4b14b0b33bc5c)

The environment property is amazing, I didn't know about it yet and I already know it will deprecate a lot of glue code. Thanks for sharing, Jannik :)

[Jannik Wempe](https://hashnode.com/@JannikWempe)

[Dec 14, 2022](https://hashnode.com/posts/github-actions-trunk-based-development/639969d1eddf26a61b5cba36/comment/63998302a6e4b14b0b33bc5c#reply-63998dcba6e4b14b0b33be4b)

Nice, happy to hear that someone learned something 🙏🏼

It was my intention to show a few different things and maybe there is something new for someone (as it was for me as well a few weeks back).
