What is a deployment?
Deployment is the process of compiling the node graph and making it available online.
How to deploy a website?
In NodeSpell, a deployment node is used to deploy a website, it takes an appEntry node as input, and creates a deployment of the website. Unless the website has only one single page, there should be a router node connected to the appEntry node as input.
Here's what each node does:
- router: the router node takes a few route nodes, which are the pages of the website. It directs urls to their corresponding routes.
- appEntry: the entry point of the website, this is the first page that is loaded when the website is accessed.
- deployment: the deployment node takes an appEntry node as input and deploys the project online.
The router is responsible for directing the user to different pages based on the URL, thus, a few route nodes are required to be connected to the router node. Each route node represents a page of the website. There is more nuance to routing, so we will cover that in a separate guide.
Deployment Settings
In the deployment node, you can set the following settings:
- Branch Name: the name of the branch to deploy to
- Message: the message of the deployment, this is used to identify the deployment, it's recommended to use a descriptive message
Branch name is by default main
, this is the naming convention coming from programming world, where main
is the main branch of the project. This is also considered the production branch, which is the branch that is deployed online, and made available to the public. Here the branch simply means a version of the project.
If you want to make a branch that's not deployed and made public, you can set the branch name to something else, such as dev
, test
, staging
, qa
, prod
, etc. It's up to you to decide the naming convention.
In NodeSpell, only main
or master
branch is deployed as the production branch, all other branches are considered development branches. Only production branches are publicly available.
Starting A Deployment
Once you have set the settings, you can start a deployment by going to Main Menu > Project > Deploy:
Here you will see all your deployment nodes, you can select one of them to deploy.
Previewing Deployment Status
Deployment usually takes a few minutes, you can check the status of the deployment from Main Menu > Project > Deployments:
Inside each deployment branch, you can preview the website, add/remove custom domains, and delete the branch, or view all historical deployments.
Adding Custom Domains
This is a separate guide, please see Adding Custom Domains.