Skip to content

Deploy and Publish

Once you have created a mockup or wireframe, you can publish the result to MockKit and collaborate with other contributors.

For how to create mockups and wireframes, see Creating Mockups.

Generating the Static Site

First, generate the static site (mockup and wireframe pages) to publish.

The following command generates the static site in the build output directory.

sh
$ npx @mockkit/cli generate

Configuring the API Key

To publish the static site to MockKit, you need to configure an API key.

First, log in to MockKit and obtain an API key.

Then configure the API key with the following command.

sh
$ npx @mockkit/cli configure

An interactive setup script runs. The API key you enter is saved to ~/.mockkit/credentials.json under your home directory.

Publishing the Static Site

Use the following command to publish the static site to MockKit.

sh
$ npx @mockkit/cli publish

An interactive setup script runs.

Available sites:
1. サンプルサイト1 (a2ca39af-779c-43e7-bd56-2a5d73e30a10)
2. サンプルサイト2 (a0838468-b6ea-400b-bb53-96ab2e369f45)
 Enter a site number from the list above (leave empty to create a new site): 
 Enter a name for the new site: Your First Site
Requesting upload session...
Upload session created.
Requesting upload URLs (1/1)...
Upload URLs received (1/1) 1/1
Uploading files [--------------------] 0/1
Uploading files [####################] 1/1
Notifying server upload completed...
Server acknowledged upload completion.
🎉 [SUCCESS] Publish completed
  Published 1 files (0 bytes) to site db3dac71-88da-46ee-965e-b66e6d873193 (version 1).
  Public URL: https://3m62y4mi3jdo5fs6wzxg3bzrsm.mockkit.app/~/
PromptDescription
Enter a site number from the list aboveLeave empty when publishing a site for the first time. If you already have sites, specify a number here to publish as a new version of that site.
Enter a name for the new siteAsked when publishing a new site. Enter the site name.

When finished, the URL of the published static site is displayed.

Immediately after publishing, only you can view the site. On the MockKit service, you can invite other collaborators to the published static site. Invited collaborators can view the site and leave comments.