Skip to content

Commit bf18bd3

Browse files
authored
Update to Cloud CLI docs re. connecting a git repo. (#2128)
* Update to Cloud CLI docs re. connecting a git repo. * Add mention for all deploy. methods * Fix heading link * Update deploys intro.
1 parent de9d2c3 commit bf18bd3

File tree

4 files changed

+43
-32
lines changed

4 files changed

+43
-32
lines changed

Diff for: docusaurus/docs/cloud/cli/cloud-cli.md

+1-4
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ sidebar_position: 3
88

99
Strapi Cloud comes with a Command Line Interface (CLI) which allows you to log in and out, and to deploy a local project without it having to be hosted on a remote git repository. The CLI works with both the `yarn` and `npm` package managers.
1010

11-
The Cloud CLI is designed as a CLI-only experience, meaning that users who wish to use Strapi Cloud to deploy their project with the CLI will have to mostly stick to using the CLI (e.g. if you login with the CLI you must logout with the CLI as well, your project deployed with the CLI can only be redeployed with the CLI etc.).
12-
1311
:::note
1412
It is recommended to install Strapi locally only, which requires prefixing all of the following `strapi` commands with the package manager used for the project setup (e.g `npm run strapi help` or `yarn strapi help`) or a dedicated node package executor (e.g. `npx strapi help`).
1513
:::
@@ -50,8 +48,7 @@ The `deploy` command can only be used by new users who have never created a Stra
5048
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.
5149

5250
- Some areas in the dashboard that are usually reserved to display information about the git provider will be blank.
53-
- Some buttons, such as the **Trigger deploy** button, will be greyed out and unclickable since you can only redeploy your project using the CLI.
54-
- Options such as environment variables, and features like the logs, are not available for CLI-created projects. <!-- to be confirmed -->
51+
- Some buttons, such as the **Trigger deploy** button, will be greyed out and unclickable since, unless you have [connected a git repository to your Strapi Cloud project](/cloud/getting-started/deployment-cli#automatically-deploying-subsequent-changes).
5552
:::
5653

5754
## strapi logout

Diff for: docusaurus/docs/cloud/getting-started/deployment-cli.md

+39-25
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,22 @@ Before you can deploy your Strapi application on Strapi Cloud using the Command
2727

2828
3. Enter the following command to log into Strapi Cloud:
2929

30-
<Tabs groupId="yarn-npm">
31-
<TabItem value="yarn" label="Yarn">
30+
<Tabs groupId="yarn-npm">
31+
<TabItem value="yarn" label="Yarn">
3232

33-
```bash
34-
yarn strapi login
35-
```
33+
```bash
34+
yarn strapi login
35+
```
3636

37-
</TabItem>
38-
<TabItem value="npm" label="NPM">
37+
</TabItem>
38+
<TabItem value="npm" label="NPM">
3939

40-
```bash
41-
npx run strapi login
42-
```
40+
```bash
41+
npx run strapi login
42+
```
4343

44-
</TabItem>
45-
</Tabs>
44+
</TabItem>
45+
</Tabs>
4646

4747
4. In the browser window that opens automatically, confirm that the code displayed is the same as the one written in the terminal message.
4848

@@ -52,29 +52,43 @@ npx run strapi login
5252

5353
1. From your terminal, still from the folder of your Strapi project, enter the following command to deploy the project:
5454

55-
<Tabs groupId="yarn-npm">
56-
<TabItem value="yarn" label="Yarn">
55+
<Tabs groupId="yarn-npm">
56+
<TabItem value="yarn" label="Yarn">
5757

58-
```bash
59-
yarn strapi deploy
60-
```
58+
```bash
59+
yarn strapi deploy
60+
```
6161

62-
</TabItem>
63-
<TabItem value="npm" label="NPM">
62+
</TabItem>
63+
<TabItem value="npm" label="NPM">
6464

65-
```bash
66-
npx run strapi deploy
67-
```
65+
```bash
66+
npx run strapi deploy
67+
```
6868

69-
</TabItem>
70-
</Tabs>
69+
</TabItem>
70+
</Tabs>
7171

7272
2. Follow the progression bar in the terminal until confirmation that the project was successfully deployed with Strapi Cloud.
7373

74+
### Automatically deploying subsequent changes
75+
76+
By default, when creating and deploying a project with the Cloud CLI, you need to manually deploy again all subsequent changes by running the corresponding `deploy` command everytime you make a change.
77+
78+
Another option is to enable automatic deployment through a git repository. To do so:
79+
80+
1. Host your code on a git repository, such as [GitHub](https://www.github.com) or [GitLab](https://www.gitlab.com).
81+
2. Connect your Strapi Cloud project to the repository (see the _Connected repository_ setting in [Projects Settings > General](/cloud/projects/settings#general)).
82+
3. Still in _Projects Settings > General_ tab, tick the box for the "Deploy the project on every commit pushed to this branch" setting. From now on, a new deployment to Strapi Cloud will be triggered any time a commit is pushed to the connected git repository.
83+
84+
:::note
85+
Automatic deployment is compatible with all other deployment methods, so once a git repository is connected, you can trigger a new deployment to Strapi Cloud [from the Cloud dashboard](/cloud/projects/deploys), [from the CLI](/cloud/cli/cloud-cli#strapi-deploy), or by pushing new commits to your connected repository.
86+
:::
87+
7488
## ⏩ What to do next?
7589

7690
Now that you have deployed your project via the Command Line Interface, we encourage you to explore the following ideas to have an even more complete Strapi Cloud experience:
7791

7892
- Fill in your [billing information](/cloud/account/account-billing) to prevent your project from being suspended at the end of the trial period.
7993
- Visit the Cloud dashboard to follow [insightful metrics and information](/cloud/projects/overview) on your Strapi project.
80-
- Check out the full [Command Line Interface documentation](/cloud/cli/cloud-cli) to learn about the other commands available.
94+
- Check out the full [Command Line Interface documentation](/cloud/cli/cloud-cli) to learn about the other commands available.

Diff for: docusaurus/docs/cloud/projects/deploys.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ sidebar_position: 1
1010

1111
The creation of a new Strapi Cloud project automatically trigger the deployment of that project. After that, deployments can be:
1212

13-
- automatically triggered everytime a new commit is pushed to the branch (see [Project settings](/cloud/projects/settings#modifying-git-repository-branch)),
14-
- or [manually triggered](#triggering-a-new-deployment) whenever needed.
13+
- manually triggered whenever needed, [from the Cloud dashboard](#triggering-a-new-deployment) or [from the CLI](/cloud/cli/cloud-cli#strapi-deploy),
14+
- or automatically triggered everytime a new commit is pushed to the branch, if the Strapi Cloud project is connected to a git repository and the "deploy on push" option is enabled (see [Project settings](/cloud/projects/settings#modifying-git-repository--branch)).
1515

1616
Ongoing deployments can also be [manually cancelled](#cancelling-a-deployment) if needed.
1717

Diff for: docusaurus/docs/cloud/projects/settings.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ There are 7 tabs available:
2727
The ![General icon](/img/assets/icons/Faders.svg) *General* tab enables you to check and update the following options for the project:
2828

2929
- *Details*: to see the name of your Strapi Cloud project, used to identify the project on the Cloud Dashboard, Strapi CLI, and deployment URLs. The project name is set at project creation (see [Project creation](/cloud/getting-started/deployment)) and cannot be modified afterwards.
30-
- *Connected Git repository*: to change the branch of the GitHub repository used for your project (see [Modifying GitHub repository branch](#modifying-git-repository-branch)). Also allows to enable/disable the "deploy on push" option.
30+
- *Connected Git repository*: to change the branch of the GitHub repository used for your project (see [Modifying GitHub repository branch](#modifying-git-repository--branch)). Also allows to enable/disable the "deploy on push" option.
3131
- *Selected region*: to see the hosting region of the project, meaning the geographical location of the servers where the project and its data and resources are stored. The hosting region is set at project creation (see [Project creation](/cloud/getting-started/deployment)) and cannot be modified afterwards.
3232
- *Debug info*: to see the internal project name for the project. This is useful for support purposes.
3333
- *Node version*: to change the Node version of the project (see [Modifying Node version](#modifying-node-version)).

0 commit comments

Comments
 (0)