Using the Netlify Build Plugin

Automatically build and deploy a GraphQL on sites hosted at Netlify

If you wish to deploy your application to Netlify, the StepZen Netlify Build Plugin will make it easy to build and deploy your Netlify frontend and your StepZen backend from the same code base. Since the build plugin runs prior to your Netlify build, updated data from your StepZen GraphQL API is available to your site at build time.

For a complete, step-by-step walkthrough showing how to build a Jamstack site using the StepZen Neltify Build Plugin, check out our tutorial on Netlify's blog.

Installing the Plugin

In order to install the plugin, you must already have a site deployed to Netlify. Netlify supports code stored in GitHub, GitLab or Bitbucket repositories. Head to Netlify and click the "New site from git" button in your Netlify dashboard.

Walk through the steps as needed to support your site deployment and/or static site generator. Once the initial deploy is done, head to the "Plugins" tab in the dashboard and then click on "Go to Plugins Directory". Search for "StepZen" and then click the "Install" button.

Netlify Plugins Directory

You'll be asked which site you want to install the plugin on. Choose the site you just created.

The plugin requires a few additional environment variables to configure it. Head to your site's Netlify dashboard and choose "Site Settings > Build and Deploy > Environment." Add the following variables:

  • STEPZEN_ACCOUNT - is your account name from your My Account page.
  • STEPZEN_ADMIN_KEY is your admin key from your My Account page.
  • STEPZEN_NAME is the endpoint name you want to use for your StepZen API. The default folder name the plugin assumes is netlify (you can override the default folder with the STEPZEN_FOLDER environment variable). So if you deployed an API as netlify/my-graphql-api, the value or STEPZEN_NAME should be my-graphql-api. STEPZEN_FOLDER would not be required as it used the default folder name value.

That's all that is needed for the plugin to work, but if you're going to call your StepZen API from within Netlify Functions or during the build of your site, you might want to set another environment variable named STEPZEN_API_KEY and set it to the value of your API key from your My Account page.

Finally, click the "Save" button. Your plugin is configured and any changes you make to our StepZen schema will now be deployed whenever a Netlify build is triggered by checking code into our GitHub repository.

This site uses cookies: By using this website, you consent to our use of cookies in accordance with our Website Terms of Use and Cookie Policy.