How to Deploy Brunch Apps on Spheron
This guide will show you how to deploy a Brunch project and get your domain up. Brunch (opens in a new tab) was built with two things in mind: speed and simplicity. You will find that the typical config of a Brunch application is an order of magnitude simpler compared to Webpack, Grunt, or Gulp. And that the time it takes to perform a fresh compilation? It's times faster. Even more so if you run the watcher — it will only rebuild what was changed, not everything, getting you incremental compilations under 500ms. (Obviously, you don't have to take our word for it. See this story shared with us by a webpack user.)
Follow these steps to deploy your Brunch app on Spheron.
While this feature is not new to developers, the magic of Spheron is that every push to any branch in your GitHub, GitLab, or Bitbucket repo triggers a new build and deployment of your project.
You can create a new Spheron project using the platform UI. First, visit Spheron Network (opens in a new tab) in your browser. Choose your preferred Git provider from the options as seen above and authorize Spheron to access the repo you want to deploy. In the next screen, select your Brunch repo from the list. Choose your preferred protocol where you want to deploy your static build. As of now, we support Arweave, Skynet, Filecoin & Pinata. You can choose any one protocol from all 4 of them. The third screen asks for details about where to create the project and how to build it. All the settings are already pre-filled based on the suggested framework. Learn more about each build setting. Check it out here (opens in a new tab).
- Choose the branch to deploy from the dropdown and provide the root directory if you have a monorepo-like app structure.
- Set the install command to yarn install
- Set the build command to yarn build
- Set the publish directory to public
- You can add some environment variables before the build.
- You can change the node engine of your deployment as well.
- Click "Deploy"
Now that you've deployed your Brunch project on Spheron, you have all the benefits of Spheron — including a custom deployment environment, continuous deployment whenever you push to your repo, and much more — as well as the benefits of Brunch, like Preview Mode, Static site rendering.
After deploying, your new Brunch project will automatically be assigned a
.spheron.app suffixed domain. You can then add a Custom Domain (opens in a new tab) of your choice.
We're so excited to see what you build with Brunch on Spheron!