Skip to content

Deploy another GitHub branch


In rare occasions, like testing a specific fix or a feature that is not released yet (i.e. not in the master branch) you might need to deploy another branch like dev in the example below.

Do not deploy dev or a branch other than master unless directed to do so (except if you know why you are doing so).

Step1: Update your repository in GitHub

  • Click here to log in at GitHub:
  • Enter your username or email and your password. Click Sign in

  • Select your own cgm-remote-monitor project (not nightscout/cgm-remote-monitor)

  • Your repository will open.

  • In the branch drop down menu (normally showing master) select dev

  • ClickFetch upstream to update it, then Fetch and merge

  • After a moment, your repository should display This branch is up to date with nightscout:dev

  • If you ran into trouble, try to Redeploy.

Step2: Deploy in Heroku


Salesforce requires two-factor-authentication for more Heroku security, this is mandatory starting Feb 2022. For an overview of possible methods see here.

  • Select your app (hidden in yellow)

  • Click on Deploy

  • Verify Heroku is connected to GitHub, if not, click Connect to GitHub

  • If Heroku is not connected to GitHub, scroll down and click Connect to GitHub, if a popup window opens and requires authorization, click Authorize Heroku

  • Verify your app cgm-remote-monitor is connected to GitHub

  • If it isn't, In Connect to GitHub, type cgm-remote-monitor and click Search then click Connect

  • If you have trouble connecting your app, click Disconnect and reconnect it as shown above

  • Scroll down to the bottom of the page, select the dev branch and click Deploy Branch

  • Build will start and information will scroll in the log window. Do not leave the page, do not interfere and wait for completion. It might take more than 10 minutes. Interrupting the process will lead to a broken site and you'll need to restart deployment.

  • Wait until the deploy process completes and click View (if nothing happens click Manage App then upper right Open App)

  • Your site will open and should be at the latest version.
  • Check your profile time zone is correct. You're done!

Step2: Deploy in Railway

  • Open Railway and click login. Login with GitHub.

  • Select your Nightscout project.

  • Select your web app.

  • Select Settings and look into Environment.

  • Change the Deployment Trigger with dev (it was showing master).

How to return to the master release

If things don't go as expected you can simply redeploy your master branch selecting it in the drop down menu:



When the dev branch gets merged into release, just follow the classic update method.

Back to top