Manual-deployments examples, using the CLI
CI/CD is great, but sometimes you need to manually deploy stuff from your computer.
This happens especially when you need to deploy an old version of the software, or want to avoid CI/CD (it's faster).
Also, they're necessary when you're running a MST app (Multiple Single Tenants), and want to deploy a specific tenant's app.
For example, we use it with MST to deploy our customers to production, CI/CD being configured to automatically deploy our own internal demo only.
Eventually, there are many reasons manual deploys can be necessary.
We don't encourage you to use them as your default workflow, but it can be handy sometimes.
This happens especially when you need to deploy an old version of the software, or want to avoid CI/CD (it's faster).
Also, they're necessary when you're running a MST app (Multiple Single Tenants), and want to deploy a specific tenant's app.
For example, we use it with MST to deploy our customers to production, CI/CD being configured to automatically deploy our own internal demo only.
Eventually, there are many reasons manual deploys can be necessary.
We don't encourage you to use them as your default workflow, but it can be handy sometimes.
Manual deployments are triggered through yarn/npm scripts.
We have one command for each customer (when running MST app) and for each stage (staging, production).
We also have helper commands meant to deploy all customers (per stage, etc.), similar to bulk actions.
1
2
3
4
5
6
7
8
9
10
11
12
yarn deploy # Alias to yarn deploy:customer1
yarn deploy:customer1 # Deploy customer1 in staging
yarn deploy:customer1:production # Deploy customer1 in production
yarn deploy:customer2 # Deploy customer2 in staging
yarn deploy:customer2:production # Deploy customer2 in production
yarn deploy:customer1:all # Deploy customer1 to staging and then to production (bulk action)
yarn deploy:all # Deploy all customers to staging (bulk action)
yarn deploy:all:all # Deploy all customers to staging and then production (bulk action)
Those commands are meant to be manually executed on your computer, and will use your local files when doing so.
They're also used by CI/CD scripts.
Note that when deploying through CI/CD, the deployed customer depends on which file is targeted as symbolic link by the
Changing the symbolic link, or "hardcoding" the file will change which customer gets deployed by default.
You can also change the way CI/CD works and deploy all your customers at once every time, but we preferred to deploy one customer in particular (our own internal demo) by default, as we judged it was less risky in case anything goes wrong.
Note that when deploying through CI/CD, the deployed customer depends on which file is targeted as symbolic link by the
vercel.json
file.Changing the symbolic link, or "hardcoding" the file will change which customer gets deployed by default.
You can also change the way CI/CD works and deploy all your customers at once every time, but we preferred to deploy one customer in particular (our own internal demo) by default, as we judged it was less risky in case anything goes wrong.