กลับไปยังเอกสาร
การปรับใช้

Deploy จาก GitHub Repository

Deploy แอปพลิเคชันของคุณโดยตรงจาก GitHub พร้อมการตรวจจับ framework อัตโนมัติ

Intermediate8 min readUpdated 2024-02-01

เชื่อมต่อ GitHub

ขั้นแรก เชื่อมต่อบัญชี GitHub ของคุณ:

  1. ไปที่ Settings > GitHub
  2. คลิก "Connect GitHub"
  3. อนุญาต Server Compass ผ่าน OAuth
  4. repositories ของคุณตอนนี้สามารถเข้าถึงได้

คุณสามารถเชื่อมต่อบัญชี GitHub หลายบัญชี (personal และ organization)

เลือก repository

  1. คลิก "Deploy New App"
  2. เลือก "GitHub" เป็นแหล่งที่มา
  3. เลือกบัญชี GitHub ของคุณ
  4. ค้นหาหรือเรียกดู repositories ของคุณ
  5. เลือก repository เพื่อ deploy

กำหนดค่า deployment

Server Compass ตรวจจับ framework ของคุณอัตโนมัติและแนะนำ:

  • Build command: npm run build ฯลฯ
  • Start command: npm start ฯลฯ
  • Dockerfile: สร้างหรือตรวจจับ

คุณสามารถปรับแต่ง:

  • Branch ที่จะ deploy
  • Environment variables
  • Build arguments
  • การกำหนดค่าพอร์ต

ตัวเลือกการ build

เลือกวิธีการ build ของคุณ:

  • Server-side build: Build บน VPS ของคุณ (ใช้ resources ของ server)
  • GitHub Actions: Build โดยใช้ CI minutes ฟรีของ GitHub (แนะนำ)

การ build ด้วย GitHub Actions ทำให้ resources ของ server ของคุณว่างสำหรับการรันแอป

Deploy และติดตาม

  1. ตรวจสอบการกำหนดค่าของคุณ
  2. คลิก "Deploy"
  3. ดู build logs แบบ real-time
  4. ติดตามความคืบหน้าการ deploy
  5. เข้าถึงแอปของคุณเมื่อเสร็จสมบูรณ์

Screenshots

Deploy จาก GitHub Repository - Screenshot 1
Deploy จาก GitHub Repository - Screenshot 2
Deploy จาก GitHub Repository - Screenshot 3

Video Tutorials

Related Features

Ready to try Server Compass?

Download the app and deploy your first application in under 5 minutes.

Download Server Compass