Search…
Simple Static Site Example - Gatsby Starter Theme

Overview

Release can detect services inside your application that are eligible for Static Service Deployment. These services are built and then deployed to the Release CDN for 🔥 blazing fast 🔥 performance.
This is an example of a simple Gatsby site that will be hosted on the CDN. It demonstrates how a Release application is setup for static builds and how they can easily be managed and deployed.

Fork the repository on Github

    1.
    On Github, navigate to the github.com/awesome-release/gatsby-starter-theme repository.
    2.
    In the top-right corner of the page click Fork. This will add a copy (or "fork") of the base repository into your account so that you can use it and edit it as you wish without needing permissions for the original (or "upstream") repository.
Fork a Repo Example

Login to Release and refresh your list of repositories

    1.
    Login to your Release account.
    2.
    Click Create New Application on the left hand sidebar.
    3.
    Refresh your repositories by clicking on the circle on the right hand side of the list of repositories. This step will add the newly-forked repo (above) in your account so that you can build from it.
    4.
    Select the gatsby-starter-theme repository and click Select Repo.
    5.
    Select the "master" branch and choose "Static" for the gatsby-starter-theme service.
    6.
    Static services on Release have three arguments that are available. We automatically detect these settings from your repository, but you may want to review them to ensure they are correct. Read more about Static Service Deployments here. For this example, the defaults are correct.
    7.
    Modify the name if needed, otherwise, it will default to your repo name. Keeping the name somewhat brief, but still descriptive is advisable. This name will be used as a prefix in the domain name. If you're interested in a custom domains, you can message us and request an upgrade.
    8.
    Review your Application Template and optionally modify if needed. You have the ability to tinker with it on the first build, but you can change it later after initial app creation.
    9.
    Add any Build Arguments or Default Environment Variables that may be required during your build. Just-in-time File Mounts also allows you to inject config files and scripts as a container starts running. In this particular example, none are needed.
    10.
    Click "Start Build & Deploy" button and Release will build and deploy your static site and push it to a Global CDN where it is hosted. You will be directed to the App Dashboard status page where you can find Builds, Environments, and Deploys that are completed or currently being built or deployed. Click around and you'll be routed to different parts of the apps where you can see a list of your Environments and live scripts running for your builds and deploys.
    Lastly, when your initial App build and deploy finishes, you can view the Environment by clicking on the <user-branchName> title under Activity. You can also click on the Deploy number to see how the deployment went. When you click on the Environment, it will show the details, for example below.
    The environment screen details the configuration of your new environment including a link to the deploy site in the Hostnames section. Your site and environment has been successfully deployed. You can also navigate to the Environments list page in the sidebar, here you can create new environments and view any additional environments that are automatically generated on every new PR.

Conclusion

This example shows the basics of creating a static site on Release. Again for more information please read Static Service Deployment for more information.
Last modified 5mo ago