stories push
Pushes stories from a local directory to a Storyblok space.
Prerequisites
Section titled “Prerequisites”- The command expects stories that have previously been pulled from a space using
stories pull. - Run
components pullto keep component schemas up-to-date, allowing for references to be resolved correctly.
storyblok stories push [flags]| Flag | Type | Description |
|---|---|---|
--space -s |
integer | Required. The ID of the Storyblok space to push stories to. |
--from, -f |
integer | Optional. The ID of the source space from which the stories were originally pulled. If not provided, the origin space equals the target space specified via --space. |
--path, -p |
string | Optional. Specify a custom path for story files. Defaults to .storyblok/stories/<space-id>. |
--dry-run, -d |
boolean | Optional. Preview changes without applying them to Storyblok. |
--cleanup |
boolean | Optional. Delete local stories after a successful push. |
--publish |
boolean | Optional. Publish stories after a successful push. |
Examples
Section titled “Examples”The following examples assume that a space has been defined in a configuration file.
# Push stories to a spacestoryblok stories push# Push stories to a space previewing changes without applying them to Storyblokstoryblok stories push --dry-runStory manifest
Section titled “Story manifest”The command creates a manifest file to keep track of story changes and references when pushing stories (stored under .storyblok/stories/<space-id>/manifest.jsonl). Specifically, it maps source IDs and filenames to target asset IDs and filenames. This serves the following purposes:
- Idempotency: Prevent duplicate uploads of the same story when running
stories pushmultiple times, recognizing existing stories and updating them instead. - Incremental workflows: As the relation between source and target stories is persisted, users can pull, modify, and push single or multiple stories incrementally.
- Migration: Mapping source and target IDs is crucial for space-to-space migrations in Storyblok as well as CMS migrations from third-party systems to Storyblok.
Was this page helpful?
This site uses reCAPTCHA and Google's Privacy Policy (opens in a new window).Terms of Service (opens in a new window) apply.
Get in touch with the Storyblok community