You can create environments to control continuous deployment for your project. Environments allow you to deploy branches from your repository on separate protocols. By default, Spheron creates two deployment environments for your project: Production & Development.
The primary branch of your repository is deployed on IPFS from the production environment by default. It looks for the central/master branch of your repository and will select the primary branch if none are available.
All the branches, except the primary, are deployed on IPFS from the development environment by default. Branches will be removed from this environment if used in any other environment.
Spheron allows you to create more deployment environments on separate protocols and add specific branches to them. To create a custom environment:
- Go to the Settings tab of your project.
- Select Deployment Environments from the sidebar.
- Add name, protocol, and branch, and Click "Save."
- If your project is deployed on IPFS and you want to move to Filecoin, you can deploy a test environment to Filecoin while maintaining your main branch on IPFS.
- Spheron automatically updates the domain attached to an environment whenever you make any changes.
- You can use separate environment variables for different environments based on requirements.