> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bricks.tools/llms.txt
> Use this file to discover all available pages before exploring further.

# 部署

> 將您的 BRICKS 應用程式部署至伺服器

直接從桌面應用程式將您的應用程式部署至 [BRICKS](https://bricks.tools) 伺服器。

## 部署您的應用程式

<Steps>
  <Step title="開啟部署對話框">
    點擊聊天面板標題列中的**操作** > **部署**。
  </Step>

  <Step title="新增變更日誌（選填）">
    輸入變更日誌說明，以記錄此次部署的變更內容。
  </Step>

  <Step title="部署">
    點擊**部署**。應用程式會在您的專案目錄中執行 `bun deploy-app -y`。
  </Step>
</Steps>

部署對話框會即時顯示指令輸出。成功時會顯示確認訊息，失敗時則會顯示錯誤輸出。

## 版本管理

您可以使用旗標手動執行部署指令來控制發布版本：

```bash theme={null}
bun deploy-app --auto-version    # bump patch version (e.g. 1.0.0 → 1.0.1)
bun deploy-app --version 2.0.0   # set explicit version
```

這兩個旗標都會在部署前更新 `package.json`。請參閱 [bricks-ctor 部署參考](/zh-Hant/ctor-pkg/getting-started#deploy)以了解所有可用旗標。

<Warning>
  部署需要安裝 `bun` 且可在 PATH 中存取。此操作有 5 分鐘的逾時限制。
</Warning>

## 開啟 BRICKS Controller

部署後，開啟[右側面板](/zh-Hant/ctor/reference/right-panel#controller)中的 **Controller** 分頁，即可在 [BRICKS Controller](/zh-Hant/controller/applications) 網頁介面中檢視您的應用程式。點選分頁列中的**在瀏覽器中開啟 Controller**，即可在預設瀏覽器中開啟相同檢視。

## 後續步驟

<Card title="拉取應用程式檔案" icon="download" href="/zh-Hant/ctor/guide/pull-app">
  從伺服器拉取最新檔案至您的本機專案。
</Card>
