Skip to Content
Sayren 유저가이드
스토어프론트 호스팅

셀러 GitHub 저장소 연결

열린 편집 환경을 끄고 발행 소스를 셀러 저장소로 옮긴다. 저장소가 비었으면 발행 버전을 첫 커밋으로 올린다. 비어 있지 않으면 저장소 코드를 그대로 쓴다 — 발행 전 작업은 보관하고(`archivedWorkRef`) 운영 브랜치를 바로 빌드해 성공하면 발행한다

POST
/v1/storefront/site/git/connect

열린 편집 환경을 끄고 발행 소스를 셀러 저장소로 옮긴다. 저장소가 비었으면 발행 버전을 첫 커밋으로 올린다. 비어 있지 않으면 저장소 코드를 그대로 쓴다 — 발행 전 작업은 보관하고(archivedWorkRef) 운영 브랜치를 바로 빌드해 성공하면 발행한다

Authorization

accessToken
headerAuthorizationBearer <JWT>

Sayren 계정 토큰(로그인 토큰 또는 개인 액세스 토큰, RFC 9068 JWT)

Header Parameters

X-Store-Id*string

대상 상점 id. 토큰의 상점 범위 밖이면 403 STORE_NOT_GRANTED, 없으면 400 STORE_ID_REQUIRED다

Request Body

application/json
  1. body
installationId*integer
Range0 < value
repoId*integer
Range0 < value
productionBranch?string

운영 배포 브랜치(생략하면 저장소 기본 브랜치)

Match^[A-Za-z0-9._-]+(\/[A-Za-z0-9._-]+)*$
Length1 <= length <= 200
rootDirectory?string

저장소 안 사이트 루트(생략하면 저장소 루트). 운영 브랜치 머리에 없는 폴더면 409 GIT_ROOT_DIRECTORY_NOT_FOUND

Match^$|^[A-Za-z0-9._-]+(\/[A-Za-z0-9._-]+)*$
Lengthlength <= 200
includePaths?array<>

배포 필터 포함 경로(저장소 루트 기준, * = 0자 이상). 생략하거나 비면 모든 경로

Itemsitems <= 50
excludePaths?array<>

배포 필터 제외 경로. 포함보다 먼저 본다

Itemsitems <= 50

Response Body

성공

application/json
  1. response
meta*
data*
error*|null
Example Request
curl -X POST 'https://api.sayren.io/v1/storefront/site/git/connect' \  -H 'X-Store-Id: string' \  -H 'Content-Type: application/json' \  -d '{  "installationId": 1,  "repoId": 1}'
Example Response
{  "meta": {    "status": 200,    "code": "OK",    "message": "OK",    "isSuccess": true  },  "data": {    "provider": "GITHUB",    "repository": "string",    "productionBranch": "string",    "rootDirectory": "string",    "includePaths": [      "string"    ],    "excludePaths": [      "string"    ],    "connectedAt": "string",    "headCommitSha": "string",    "mainChanged": true,    "autoPromotePaused": true,    "publishPending": true,    "publishErrorCode": "string",    "archivedWorkRef": "string",    "lastDisconnect": {      "reason": "string",      "repository": "string",      "at": "string"    }  },  "error": null}