iT邦幫忙

2025 iThome 鐵人賽

DAY 8
2
生成式 AI

AI-Driven Development - 個人開發者的敏捷實踐系列 第 8

Day 8 - Claudable 一鍵部署魔法:從本地到線上,5 分鐘搞定所有設定

  • 分享至 

  • xImage
  •  

昨天我們用 Claudable 在 30 分鐘內建立了一個習慣追蹤器,但還停留在本地端。今天要來揭秘 Claudable 最強大的功能之一:一鍵部署。只要設定好三個服務,你的應用就能自動上線,而且包含資料庫、版本控制、自動部署,一次到位!

為什麼部署這麼重要?

還記得我們在 Day 1 提到的痛點嗎?傳統部署流程是這樣的:

  1. 本地開發完成(假設順利)
  2. 推送到 GitHub(10 分鐘)
  3. 設定資料庫(30 分鐘)
  4. 配置部署環境(30 分鐘)
  5. 處理環境變數(20 分鐘)
  6. Debug 各種問題(1-3 小時)

而 Claudable 的一鍵部署,把這些步驟壓縮到 5 分鐘。更重要的是,它不只是快,而是正確且可靠。

Claudable 的三劍客:GitHub + Supabase + Vercel

在 Claudable 的世界裡,這三個服務形成了完美的開發部署鐵三角:

  • GitHub:版本控制 + 程式碼託管
  • Supabase:PostgreSQL 資料庫
  • Vercel:自動部署

最棒的是,這三個服務都有免費額度,對個人開發者來說綽綽有餘。

連結服務

我們可以來設定一下 Claudable 三劍客。

沒設定的時候你會看到的畫面:
https://ithelp.ithome.com.tw/upload/images/20250907/20149301wygcZpice9.png

點擊設定的按鈕會跳出 Service Tokens 的設定頁面,可以依照每一個項目的說明進行設定:
https://ithelp.ithome.com.tw/upload/images/20250907/20149301g7ANjX4i7s.png

所有燈號變為綠色代表設定完了:
https://ithelp.ithome.com.tw/upload/images/20250907/20149301ly2JYj8Guy.png

設定完之後還需要個別連接:
https://ithelp.ithome.com.tw/upload/images/20250908/20149301WL6fHHjOKz.png

連接 Github

按下 Connect 的按鈕後,可以輸入 repo 的設定:

https://ithelp.ithome.com.tw/upload/images/20250908/201493015gG2NE23UG.png

成功建立後會在 Github 上建立這個 repo。

順序上需要先建立 Github repo 後才可以繼續設定 Vercel

連接 Vercel

按下 Connect 的按鈕後,可以輸入 project 的設定:
https://ithelp.ithome.com.tw/upload/images/20250908/20149301kHiuNmccYn.png

確認後可以成功建立 Vercel project。

Error

但是!!如果你遇到下面的這個錯誤,不要緊張,只要安裝一下 integration 即可。

Unexpected error: Failed to create project: To link a GitHub repository, you need to install the GitHub integration first. Make sure there aren't any typos and that you have access to the repository if it's private.

https://ithelp.ithome.com.tw/upload/images/20250908/20149301FXEl4GVi4U.png

安裝 Github Integration

前往 https://github.com/apps/vercel 並且按下 Configure 按鈕 後可以進行安裝:
https://ithelp.ithome.com.tw/upload/images/20250908/2014930193npAKyG2H.png

安裝後再回到 Claudable 連接 Vercel 就可以成功了
https://ithelp.ithome.com.tw/upload/images/20250908/201493016DJzDmD68s.png

Vercel 自動就有這個專案並以連接 Github:
https://ithelp.ithome.com.tw/upload/images/20250908/20149301s0wVEUPRN7.png

部署

連接完 Github & Vercel 之後只要在 Claudable 對話框請他進行 push 就可以成功 push 到 Github:

https://ithelp.ithome.com.tw/upload/images/20250908/201493010paU0nNcrP.png

push 上去之後 Vercel 就會自動部署,實現一鍵部署:
https://ithelp.ithome.com.tw/upload/images/20250908/20149301GsKWDGlEJj.png

今日總結:部署不再是噩夢

今天我們完成了 Claudable 的部署設定,包括:

  • 設定三大服務的 Token
  • 了解一鍵部署的運作原理
  • 學會處理常見問題

最重要的是,我們把部署這件事從「技術難題」變成了「理所當然」。當部署變得如此簡單,你就能把所有精力放在真正重要的事:創造用戶喜愛的產品。

三個關鍵體悟

  • 自動化是王道:能自動化的,就不要手動
  • 整合創造價值:單一工具很強,整合後更強
  • 專注核心工作:部署是手段,產品才是目的

今天建立的專案可以在筆者的 Github 上面找到:
https://github.com/ci-yang/habit-tracker


上一篇
Day 7 - Claudable 實戰:30 分鐘打造個人習慣追蹤器
系列文
AI-Driven Development - 個人開發者的敏捷實踐8
圖片
  熱門推薦
圖片
{{ item.channelVendor }} | {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言