curl --location --request POST 'https://api.github.com/repos///pages' \
--header 'Content-Type: application/json' \
--data-raw '{
"source": {
"branch": "main",
"path": "/docs"
}
}'
{
"cname": "example.com",
"custom_404": false,
"html_url": "https://example.com",
"https_certificate": {
"description": "Certificate is approved",
"domains": [
"example.com",
"www.example.com"
],
"expires_at": "2019-08-24",
"state": "approved"
},
"https_enforced": true,
"public": true,
"source": {
"branch": "string",
"path": "string"
},
"status": "built",
"url": "https://api.github.com/repos/github/hello-world/pages"
}
Authorization: Bearer ********************
/
or /docs
. Default: /
true
, the site is accessible to anyone on the internet. If set to false
, the site will only be accessible to users who have at least read
access to the repository that published the site.【GitHub】API开发者 微信交流群
用微信扫右侧二维码,加入【GitHub】API开发者 交流群,互助沟通