Files
web-alterflixhub/docs/push-to-gitea.md
T
Bkk1234 e6e935762e docs: ปรับเอกสารให้ตรงสถานะปัจจุบัน (motion, parity, SEO, push)
- README: เพิ่มบรรทัด "หน้าตาเท่ากันทุกเอนจิน" + อธิบายการ gate อนิเมชันแบบสองชั้น
- docs/api.md: content store มี forCinemas/forFilmLovers · loader คืน origin/siteUrl/shareOrigin · sitemap/robots เป็น Nitro route
- docs/architecture.html: แก้ robots ไม่ใช่ static, 7 แท็บ, เพิ่ม ShareOriginProvider/MotionBootstrap, parity layer, แก้คำผิด "블록"
- docs/push-to-gitea.md: เขียนใหม่ให้ตรงจริง (repo web-alterflixhub, ต้อง -c http.version=HTTP/1.1, ลำดับก่อน push, วิธีตรวจว่า push ขึ้น)
2026-11-14 13:27:53 +07:00

49 lines
2.3 KiB
Markdown

# push ขึ้น Gitea
repo นี้ผูก remote ไว้แล้วและ **push ได้แบบไม่ต้องล็อกอินซ้ำ** ในเครื่องนี้ (credential ถูกเก็บไว้แล้ว)
```
remote : http://103.107.52.82:3004/alterflixhub/web-alterflixhub.git
branch : main
```
## คำสั่งที่ใช้จริง
```bash
cd D:/Git/workspace/web-alterflixhub
git -c http.version=HTTP/1.1 push origin main
```
**ต้องใส่ `-c http.version=HTTP/1.1` เสมอ** — Gitea ตัวนี้ปิด HTTP/2 ไว้ ทำให้ push แบบ HTTP/2 ค้าง/หลุดกลางทาง
## ลำดับก่อน push (ทำทุกครั้ง)
```bash
pnpm typecheck # ต้องผ่าน
npx vitest --run app/lib # unit tests (16 ไฟล์ / 135+ ตัว)
git add -A
git commit -m "..." # ข้อความสั้น บอกสิ่งที่เปลี่ยน
git -c http.version=HTTP/1.1 push origin main
```
ถ้าแก้ `public/sw.js` ต้อง bump `VERSION` ในไฟล์นั้นก่อน commit (ขั้น activate จะเก็บกวาดแคชเก่าให้เอง)
## ถ้า credential หมดอายุ / ขึ้น 401
สร้าง token ที่ Gitea → Settings → Applications → Generate New Token (สิทธิ์ `write:repository`)
แล้วตั้ง remote ใหม่ (แทน `<TOKEN>` ด้วยค่าจริง — **ห้ามเก็บลงไฟล์ที่ commit**):
```bash
git remote set-url origin "http://Bkk1234:<TOKEN>@103.107.52.82:3004/alterflixhub/web-alterflixhub.git"
```
หรือล็อกอินผ่าน Git Credential Manager จาก terminal ปกติของ Windows (ไม่ผ่าน agent) แล้ว `git push` หนึ่งครั้ง
## ตรวจว่าขึ้นจริง
```bash
git log --oneline -1 origin/main # ต้องเห็น commit ล่าสุด
git status -sb # ต้องไม่มี ahead
git ls-remote origin main # hash ต้องตรงกับ HEAD
```