From 2c38eb826902591096a0c029067ef5db7203a670 Mon Sep 17 00:00:00 2001 From: Gonzalo Andres Garcia Date: Tue, 5 Nov 2024 11:50:35 +0100 Subject: [PATCH 1/6] feat(cli): strapi cloud environment link --- docusaurus/docs/cloud/cli/cloud-cli.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/docusaurus/docs/cloud/cli/cloud-cli.md b/docusaurus/docs/cloud/cli/cloud-cli.md index a79587bd1e..505bd2c908 100644 --- a/docusaurus/docs/cloud/cli/cloud-cli.md +++ b/docusaurus/docs/cloud/cli/cloud-cli.md @@ -41,7 +41,13 @@ 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. + +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. @@ -97,6 +103,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` From 0959990a53316b2a496c1bf590b3a8cba92c2f8b Mon Sep 17 00:00:00 2001 From: Gonzalo Andres Garcia Date: Thu, 7 Nov 2024 10:23:10 +0100 Subject: [PATCH 2/6] chore: flag mod --- docusaurus/docs/cloud/cli/cloud-cli.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus/docs/cloud/cli/cloud-cli.md b/docusaurus/docs/cloud/cli/cloud-cli.md index 505bd2c908..eacd40ef92 100644 --- a/docusaurus/docs/cloud/cli/cloud-cli.md +++ b/docusaurus/docs/cloud/cli/cloud-cli.md @@ -44,7 +44,7 @@ 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. 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 `) +- 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. From 5f5d60eb054d42842c72d52b44d61472944b4ed9 Mon Sep 17 00:00:00 2001 From: Gonzalo Andres Garcia Date: Thu, 7 Nov 2024 10:43:18 +0100 Subject: [PATCH 3/6] chore: stale doc --- docusaurus/docs/cloud/cli/cloud-cli.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docusaurus/docs/cloud/cli/cloud-cli.md b/docusaurus/docs/cloud/cli/cloud-cli.md index eacd40ef92..41b5163896 100644 --- a/docusaurus/docs/cloud/cli/cloud-cli.md +++ b/docusaurus/docs/cloud/cli/cloud-cli.md @@ -51,10 +51,6 @@ The terminal will inform you when the project is successfully deployed on Strapi 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 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. From 98e63acd1332ba3adb8b9b429719b7e2888de596 Mon Sep 17 00:00:00 2001 From: Gonzalo Andres Garcia Date: Thu, 7 Nov 2024 11:39:41 +0100 Subject: [PATCH 4/6] chore: update docs --- docusaurus/docs/cloud/cli/cloud-cli.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docusaurus/docs/cloud/cli/cloud-cli.md b/docusaurus/docs/cloud/cli/cloud-cli.md index 41b5163896..68400e9e4d 100644 --- a/docusaurus/docs/cloud/cli/cloud-cli.md +++ b/docusaurus/docs/cloud/cli/cloud-cli.md @@ -41,7 +41,10 @@ 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. +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. + +:::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 `) @@ -64,6 +67,9 @@ 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 ``` From 0bcb87514a16c70bf14b44e6ed02ba4796c7af65 Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Tue, 12 Nov 2024 18:13:14 +0100 Subject: [PATCH 5/6] Update docusaurus/docs/cloud/cli/cloud-cli.md --- docusaurus/docs/cloud/cli/cloud-cli.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docusaurus/docs/cloud/cli/cloud-cli.md b/docusaurus/docs/cloud/cli/cloud-cli.md index 68400e9e4d..dee505ba17 100644 --- a/docusaurus/docs/cloud/cli/cloud-cli.md +++ b/docusaurus/docs/cloud/cli/cloud-cli.md @@ -45,6 +45,7 @@ This command must be used after the `login` one. It deploys a local Strapi proje :::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 `) From 4d00e22a37e49a7a3914862787299ec0339656a4 Mon Sep 17 00:00:00 2001 From: Pierre Wizla Date: Tue, 12 Nov 2024 18:38:55 +0100 Subject: [PATCH 6/6] Fix layout --- docusaurus/docs/cloud/cli/cloud-cli.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docusaurus/docs/cloud/cli/cloud-cli.md b/docusaurus/docs/cloud/cli/cloud-cli.md index dee505ba17..d4d4b8ab5d 100644 --- a/docusaurus/docs/cloud/cli/cloud-cli.md +++ b/docusaurus/docs/cloud/cli/cloud-cli.md @@ -70,6 +70,7 @@ 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