apicheats.dev Cheat sheet Raw .md
PUT

Try PUT /repos/{owner}/{repo}/pages — GitHub API

GitHub playground

Update information about a GitHub Pages site

Credentials

Kept in this tab only. Requests go through apicheats.dev's same-origin proxy straight to api.github.com; the proxy stores and logs nothing about them.

Headers

Path

Body application/json

4 body fields
  • cname · optional · string — 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](https://docs.github.com/pages/configuring-a-custom-domain-for-your-github-pages-site)."
  • https_enforced · optional · boolean — Specify whether HTTPS should be enforced for the repository.
  • build_type · required · string — 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.
  • source · optional · string — 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"`.