Page Generation | Yext Hitchhikers Platform
What You’ll Learn
In this section, you will learn:
- How different development environments work
- What happens during a deploy
- Best practices for publishing
Overview
Before we delve into the depths of page generation, it’s important to understand how the deployment process works. Deployments are fully rendered versions of your site that can be published to staging or production in seconds.
As is standard in web development, with Yext your sites come with two environments:
- Staging - where you “stage your changes” as you’re developing new features or building the site from scratch
- Production - “production ready” or as we like to call it, “ready for primetime” (RFPT©)
You always want to test your changes in staging before you push to production to make sure you catch any errors before your consumers (or your boss!).
Pages Deployment Process
As you become more familiar with web development, deploying and publishing your site are critical steps in creating your web experience.
In Yext Search, it’s important to know a couple of things about the Deploy process:
When you commit your code or when you are creating your live preview, you are kicking off a Deploy via the Yext CI System
The deploy takes the information in your repository, injects additional data points like your business ID and your API key, and makes your site ready for publishing to a public directory by running through a post-processing toolchain.
Deploys can take anywhere from 30 seconds to several minutes (or more!) depending on the complexity of the toolchain it’s running. A simple site generated off of the Search Jambo Template should take less than a few minutes.
The deployment process is broken out into three discrete phases:
- Initial Build - Generates all the static assets of the site
- Initial Page Generation - Generates HTML web pages of the site pulling in any relevant Knowledge Graph data
- Ongoing Data Updates - Listens for any changes in the Knowledge Graph and updates the relevant pages
As an Admin, you don’t need to know the dirty details of what’s happening in the build or too much about what the Yext CI is (unless you’re super curious!) – it’s more important to understand that conceptually this deploy happens and when there are errors or issues you will need to address those. You’ll see successful completions or errors under the specific deployment phases and you can click into them for more details.
Managing Your Search Deploys
In addition to the Live Preview links you can get from the Code Editor, you will have three different types of links from your deploys: deploy previews, staging links, and a production link.
Deploy Preview Links
Each deploy has a deploy-specific preview link. Clicking the Preview button next to a deploy will open a new tab with that version of your site.
When you are working on your site you can easily preview multiple deploys to compare your work or send different versions of the site to the relevant stakeholders for feedback.
Note that each site may have up to five active preview links at a time across all branches. If you want to share a preview link for a commit that no longer has one, click on the dropdown for the relevant deploy and click Redeploy to generate a preview link.
Staging and Production Links:
At the top of the Deploys screen, you will see a Production and Staging link. These are permalinks that will always display the version of the site that is pushed to either staging or production. These can be easily shared with coworkers to reflect your latest work at any time.
The current staged deploy will be marked with an orange “Staging” indicator and the one pinned to production will have a green “Production” indicator.
Note you can have a staging link for each branch (the branch name is prepended to the staging domain), but only one production link across the site that must be from the production branch. If a commit is not currently deployed, you’ll have to redeploy it before you can publish it to staging or production.
Staging and Production Best Practices
By default, your most recent deploy is pinned to staging. This allows anyone with the staging link to see the most up-to-date version of a recently added change.
On the other hand, production is not automatically updated and you must manually publish a deploy to production. You should thoroughly QA your experience in staging before publishing it to production.
You can change this in the Settings for your site.
How to Publish Your Page to Production
To publish your Search experience to either staging or production, navigate to the Deploys screen. Find the commit you’d like to publish, then click the dropdown on the right and select Publish to staging or Publish to production.
For more information about the Pages deployment process, how to navigate the deploy screens, and how to manage your deploys, check out the Deploy Pages module in the Pages track.