Production

Well, this is the real deal.

Basically works the same way as staging, the only difference is that you’ll never push directly to it. I advise you to read first about the Staging app as it covers concepts used by the production application as well.

How to push to prod?

You should have an opened PR on staging, ready to be released to production.

In summary, you’ll:

  1. From your PR, “Rebase & Merge” into main.

  2. From a terminal, checkout to the main branch & pull.

  3. Run scripts/bump-version

    1. If it fails, it’s probably telling you something like: “Branch behind commit”, basically meaning that your local main branch is not up to date with the origin one. Weird right? You did just pulled the branch on the 2nd step…

    2. No worries though, it’s easily fixable by running git pull origin main --rebase

    3. Now, you should be able to re-run the “bump-version” script.

  4. At this stage, the release is in progress and you can see 1 2 builds in progress. Why 2? Because you actually did 2 pushes on main:

    1. The first one was when you “Rebased & Merged” staging onto main.

    2. The second one was when you ran the scripts/bump-version , which incremented the version number & reloaded the translations.

    ⇒ 2 pushes = 2 github actions

  5. Now, you need to put staging up to date with main. To do so, checkout to staging and run: git pull origin main --rebase . This rebase main into your locale staging branch, so now we just need to update the origin branch as well.

  6. As you did a rebase, you rewrote the commits history and won’t be able to simply run git push . To be able to push to staging, you’ll need to force it: git push --force-with-lease

  7. And voilà! Don’t forget to inform your teammates of the latest release and to monitor its release in the “Activity” panel of the production application. After the deploy, always check the prod app to see that it’s all working well, and monitor bugsnag to check for un-covered bugs.


Now that we’ve got that covered, let’s have a look at all the resources we use on Heroku.

Last updated