Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cspell.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module.exports = {
'node_modules',
'pnpm-lock.yaml',
],
words: ['Rolldown', 'frontends', 'Zephyr Cloud', 'Micro-frontends', 'Fastly'],
flagWords: banWords,
dictionaries: ['dictionary'],
dictionaryDefinitions: [
Expand Down
54 changes: 54 additions & 0 deletions packages/document/docs/en/guide/basic/deploy.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { PackageManagerTabs } from '@theme';

# Deployment

In this section, we will discuss the deployment of the project. We assume that you have completed the development of the project and now need to deploy the project online. You need to consider the following aspects:
Expand Down Expand Up @@ -182,6 +184,58 @@ You can deploy your Rspress site on [Kinsta](https://kinsta.com/static-site-host

6. Click the **Create site**.

### Deploy to zephyr cloud

[Zephyr Cloud](https://zephyr-cloud.io) is a deployment orchestration platform allowing users to deploy applications bundled by major build tools such as Rspack, Rspress, Vite, webpack, Rollup, Rolldown, Parcel, Re.Pack and Metro with exceptional support for Micro-frontends. It enables users to bring their own cloud includes but not limited to: Cloudflare, Netlify, Fastly, etc.

You can find more information about Zephyr Cloud and how to deploy with different build tools [in their documentation](https://docs.zephyr-cloud.io).

#### How to deploy

1. You will need to register an account on [Zephyr Cloud](https://app.zephyr-cloud.io) first.

2. Install `zephyr-rspack-plugin` in your Rspress project.

<PackageManagerTabs command="install zephyr-rspack-plugin@latest" />

3. Add the following configuration to your `rspress.config.ts` file:

```ts title="rspress.config.ts"
/** Rest of your imports */
import { withZephyr } from 'zephyr-rspack-plugin';

/** Create a small plugin */

const zephyrRsbuildPlugin = () => ({
name: 'zephyr-rsbuild-plugin',
setup(api: {
// biome-ignore lint/suspicious/noExplicitAny: `modifyRspackConfig` is a valid method
modifyRspackConfig: (arg0: (config: any) => Promise<void>) => void;
}) {
api.modifyRspackConfig(async (config) => {
config.name === 'web' && (await withZephyr()(config));
});
},
});

export default defineConfig({
/** Rest of your config */
builderConfig: {
plugins: [zephyrRsbuildPlugin()],
},
});
```

:::info
Zephyr Cloud's documentation is also written with Rspress and deployed to Zephyr Cloud, you can find the build configuration's source code [here](https://github.com/ZephyrCloudIO/zephyr-documentation/blob/main/rspress.config.ts).
:::

4. Run `npm run build`

After the build is complete, you will find the `doc_build` directory in the project root directory. Your documentation site will be deployed automatically (requires authentication from terminal) after the build is completed with a preview URL in your terminal output.

You can also find the preview URL in your Zephyr Cloud dashboard and modify a custom domain for your site. Read more about how to do it in their [environment guide](https://docs.zephyr-cloud.io/features/environments).

### Deploy to Zeabur

[Zeabur](https://zeabur.com) is a platform for deploying services instantly, which allows you to directly deploy your Rspress site without any other configurations.
Expand Down