# Preview Branches
Once you create a Pull Request with your changes, MarfeelCD automatically deploys a unique version of the Media Group so that you can evaluate the result of your changes. This version of the Media Group and its sites runs in the production environment but the changes do not affect the production versions of the sites.
Every Preview branch has an unique URL so you can create multiple Preview Branches for the same Media Group and share them with others.
# Using Preview Branches
Once you have pushed your changes to GitHub and created a Pull Request, the build process is triggered.
You can find the status and more information about each step of the build process in the Checks section of the Pull Request.
When the Preview branch is available, the Marfeel CI bot posts a comment on your pull request with its link.
You can also click the details link in Preview Branch Check and it will bring you to a page listing the URLs for the modified Tenants.
The URL for your Preview Branch is based on the name you used for your branch in Git, so if the branch you created your Pull Request from was named cool-feature
, your Preview Branch will be available at https://cool-feature.live.mrf.io/example.com/index/
.
You can make additional changes to your Pull Request and they will be available in your Preview Branch as soon as the build process finish.
# Invalidations
If you have updated the Definition, WhiteCollar files or any of the Providers, the modified tenants will be automatically invalidated by the build process.
For other changed files that require an invalidation (e.g. widgets.json
), it must be done manually with the glue
command-line interface.
Using Glue, you can perform an invalidation for a Tenant with the command:
$ glue invalidate --production
TIP
The Glue invalidation command takes your current Git branch into consideration and updates the corresponding Preview Branch. Read Glue documentation for more information.
# Restrictions
In order to be able to use Preview Branches, the branch name is part of the hostname in the preview branches URL. For this reason, the branch name must be compliant as a valid host name and follow the guidelines shown below:
Branch name
Hostname may contain only the ASCII letters 'a' through 'z' (in a case-insensitive manner), the digits '0' through '9' and the hyphen-minus character ('-').
Reference: Wikipedia - Restrictions on valid hostnames (opens new window)
Although we perform some normalization logic on the branch, it is strongly recommended to follow these guidelines in order to avoid any unexpected result during the build process or when rendering the preview branch.