Skip to content

Commit 776eda5

Browse files
committed
docs: Update readme
1 parent 32a12b8 commit 776eda5

1 file changed

Lines changed: 31 additions & 23 deletions

File tree

README.md

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
- **Partial sync** (Import or export only specific portions of config)
2727
- **Exclude configs** (Exclude specific config from the sync)
2828

29-
3029
## ⏳ Installation
3130

3231
Install the plugin in your Strapi project.
@@ -98,28 +97,6 @@ This plugin gives you the tools to sync this data. You can export the data as JS
9897

9998
_With great power comes great responsibility - Spider-Man_
10099

101-
## ⌨️ Usage / Workflow
102-
### Local development
103-
When building a new feature locally for your Strapi project you'd use the following workflow:
104-
105-
- Build the feature.
106-
- Export the config. Either through the CLI or the GUI.
107-
- Commit and push the files to git.
108-
109-
### Deployment
110-
When deploying the newly created feature you'd use the following workflow:
111-
112-
- Pull the latest file changes to the environment.
113-
- Import the config. Preferably through the CLI.
114-
- (Re)start your Strapi instance.
115-
116-
### Production deployment
117-
When you're deploying your Strapi project to production please be cautious when import the config.
118-
You should make sure there are no config changes that will be overwritten by the import.
119-
If there have been made changes to the config since the last import you should export these first before importing the new config.
120-
121-
_There really shouldn't be any config changes made directly on production. This is a bad practice._
122-
123100
## 🔌 Command line interface (CLI)
124101

125102
Add the `config-sync` command as a script to the `package.json` of your Strapi project:
@@ -208,6 +185,37 @@ By clicking on one of the items in the diff table you can see the exact differen
208185

209186
<img src="https://raw.githubusercontent.com/boazpoolman/strapi-plugin-config-sync/master/.github/config-diff.png" alt="Config diff in admin" />
210187

188+
## ⌨️ Usage / Workflow
189+
This plugin works best when you use `git` for the version control of your Strapi project. When you do so, with this plugin you are able to version control your config data through files.
190+
191+
_The following workflows are assuming you're using `git`._
192+
193+
### Local development
194+
When building a new feature locally for your Strapi project you'd use the following workflow:
195+
196+
- Build the feature.
197+
- Export the config.
198+
- Commit and push the files to git.
199+
200+
### Deployment
201+
When deploying the newly created feature - to either a server, or a co-worker's machine - you'd use the following workflow:
202+
203+
- Pull the latest file changes to the environment.
204+
- (Re)start your Strapi instance.
205+
- Import the config.
206+
207+
### Production deployment
208+
When deploying to production you'd use the same deployment workflow as described above. But before you do, you have to take some extra precautions to ensure no data will be lost:
209+
210+
- Run `yarn cs diff` to verify there are no config changes that could be overwritten.
211+
- If there have been changes made;
212+
- Export these before you pull the new config.
213+
- Commit and push the exported files to git.
214+
- If needed; merge into the branch you were about to pull.
215+
- Continue with the regular deployment workflow.
216+
217+
Try to avoid making config changes directly on production. You wouldn't want to change something like API permissions (roles) on production without it being in your version control.
218+
211219
## 🚀 Config types
212220

213221
### Admin role

0 commit comments

Comments
 (0)