diff --git a/docusaurus/docs/cloud/cli/cloud-cli.md b/docusaurus/docs/cloud/cli/cloud-cli.md index a79587bd1e..d4d4b8ab5d 100644 --- a/docusaurus/docs/cloud/cli/cloud-cli.md +++ b/docusaurus/docs/cloud/cli/cloud-cli.md @@ -41,14 +41,20 @@ Deploy a new local project (< 100MB) in Strapi Cloud. strapi deploy ``` -This command must be used after the `login` one. It deploys a local Strapi project on Strapi Cloud, without having to host it on a remote git repository beforehand. The terminal will inform you when the project is successfully deployed on Strapi Cloud. +This command must be used after the `login` one. It deploys a local Strapi project on Strapi Cloud, without having to host it on a remote git repository beforehand. -Once the project is first deployed on Strapi Cloud with the CLI, the `deploy` command can be reused to trigger a new deployment of the same project. - -:::caution -The `deploy` command can only be used by new users who have never created a Strapi Cloud project, and for which the free trial is still available. Once a project is deployed with the CLI, it isn't possible to deploy another project on the same Strapi Cloud account with the CLI. +:::note +If you have any free trial available, the deploy command will create automatically a new project on Strapi Cloud, unless you previously link your local project to an existing project by using the `strapi link` command. ::: +When you use this command, you’ll be asked to select a target environment. To skip this prompt, you can either: +- Use the `--env` flag (e.g., `strapi deploy --env `) +- Set a default environment with `strapi cloud environment link` [command](#cloud-environment-link), so deployments automatically go to that environment. + +The terminal will inform you when the project is successfully deployed on Strapi Cloud. + +Once the project is first deployed on Strapi Cloud with the CLI, the `deploy` command can be reused to trigger a new deployment of the same project. + :::note Once you deployed your project, if you visit the Strapi Cloud dashboard, you may see some limitations as well as impacts due to creating a Strapi Cloud project that is not in a remote repository and which was deployed with the CLI. @@ -62,6 +68,10 @@ Once you deployed your project, if you visit the Strapi Cloud dashboard, you may Links project in current folder to an existing project in Strapi Cloud. +:::note +Linking a project to Strapi Cloud doesn't limit it to Strapi Cloud alone; you can still deploy and manage it in your own self-hosted environment as needed. +::: + ```bash strapi link ``` @@ -97,6 +107,16 @@ strapi cloud environments This command retrieves and displays a list of all environments belonging to your Strapi Cloud project. +## strapi cloud environment link {#cloud-environment-link} + +Links your local project to a specific environment in your Strapi Cloud project. + +```bash +strapi cloud environment link +``` + +This command shows a list of all environments in your Strapi Cloud project and lets you choose one. The selected environment will then be the default for direct deployments. + ## strapi logout **Alias:** `strapi cloud:logout`