Update information about a GitHub Pages site
Updates information for a GitHub Pages site. For more information, see “About GitHub Pages.
The authenticated user must be a repository administrator, maintainer, or have the ‘manage GitHub Pages settings’ permission.
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The account owner of the repository. The name is not case sensitive.
The name of the repository without the .git extension. The name is not case sensitive.
Request Body required
Section titled “ Request Body required ”object
Specify a custom domain for the repository. Sending a null value will remove the custom domain. For more about custom domains, see “Using a custom domain with GitHub Pages.”
Specify whether HTTPS should be enforced for the repository.
The process by which the GitHub Pages site will be built. workflow means that the site is built by a custom GitHub Actions workflow. legacy means that the site is built by GitHub when changes are pushed to a specific branch.
Update the source for the repository. Must include the branch name, and may optionally specify the subdirectory /docs. Possible values are "gh-pages", "master", and "master /docs".
Update the source for the repository. Must include the branch name and path.
object
The repository branch used to publish your site’s source files.
The repository directory that includes the source files for the Pages site. Allowed paths are / or /docs.
object
Specify a custom domain for the repository. Sending a null value will remove the custom domain. For more about custom domains, see “Using a custom domain with GitHub Pages.”
Specify whether HTTPS should be enforced for the repository.
The process by which the GitHub Pages site will be built. workflow means that the site is built by a custom GitHub Actions workflow. legacy means that the site is built by GitHub when changes are pushed to a specific branch.
Update the source for the repository. Must include the branch name, and may optionally specify the subdirectory /docs. Possible values are "gh-pages", "master", and "master /docs".
Update the source for the repository. Must include the branch name and path.
object
The repository branch used to publish your site’s source files.
The repository directory that includes the source files for the Pages site. Allowed paths are / or /docs.
object
Specify a custom domain for the repository. Sending a null value will remove the custom domain. For more about custom domains, see “Using a custom domain with GitHub Pages.”
Specify whether HTTPS should be enforced for the repository.
The process by which the GitHub Pages site will be built. workflow means that the site is built by a custom GitHub Actions workflow. legacy means that the site is built by GitHub when changes are pushed to a specific branch.
Update the source for the repository. Must include the branch name, and may optionally specify the subdirectory /docs. Possible values are "gh-pages", "master", and "master /docs".
Update the source for the repository. Must include the branch name and path.
object
The repository branch used to publish your site’s source files.
The repository directory that includes the source files for the Pages site. Allowed paths are / or /docs.
object
Specify a custom domain for the repository. Sending a null value will remove the custom domain. For more about custom domains, see “Using a custom domain with GitHub Pages.”
Specify whether HTTPS should be enforced for the repository.
The process by which the GitHub Pages site will be built. workflow means that the site is built by a custom GitHub Actions workflow. legacy means that the site is built by GitHub when changes are pushed to a specific branch.
Update the source for the repository. Must include the branch name, and may optionally specify the subdirectory /docs. Possible values are "gh-pages", "master", and "master /docs".
Update the source for the repository. Must include the branch name and path.
object
The repository branch used to publish your site’s source files.
The repository directory that includes the source files for the Pages site. Allowed paths are / or /docs.
object
Specify a custom domain for the repository. Sending a null value will remove the custom domain. For more about custom domains, see “Using a custom domain with GitHub Pages.”
Specify whether HTTPS should be enforced for the repository.
The process by which the GitHub Pages site will be built. workflow means that the site is built by a custom GitHub Actions workflow. legacy means that the site is built by GitHub when changes are pushed to a specific branch.
Update the source for the repository. Must include the branch name, and may optionally specify the subdirectory /docs. Possible values are "gh-pages", "master", and "master /docs".
Update the source for the repository. Must include the branch name and path.
object
The repository branch used to publish your site’s source files.
The repository directory that includes the source files for the Pages site. Allowed paths are / or /docs.
Examples
{ "cname": "octocatblog.com", "source": { "branch": "main", "path": "/" }}Responses
Section titled “ Responses ”Response
Bad Request
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Scim Error
object
Example generated
{ "message": "example", "documentation_url": "example", "detail": "example", "status": 1, "scimType": "example", "schemas": [ "example" ]}Conflict
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Validation failed, or the endpoint has been spammed.
Validation Error
object
object
Example generated
{ "message": "example", "documentation_url": "example", "errors": [ { "resource": "example", "field": "example", "message": "example", "code": "example", "index": 1, "value": [ "example" ] } ]}