v50

latestOpenAPI 3.0.3MITraw.githubusercontent.com2024-03-2585861610.1 MB
repos

Create a GitHub Pages deployment

Create a GitHub Pages deployment for a repository.

The authenticated user must have write permission to the repository.

post/repos/{owner}/{repo}/pages/deployments

Path parameters

ownerstring required

The account owner of the repository. The name is not case sensitive.

repostring required

The name of the repository without the .git extension. The name is not case sensitive.

Request body

artifact_urlstring required

The URL of an artifact that contains the .zip or .tar of static assets to deploy. The artifact belongs to the repository.

environmentstring

The target environment for this GitHub Pages deployment.

pages_build_versionstring required

A unique string that represents the version of the build for this deployment.

oidc_tokenstring required

The OIDC token issued by GitHub Actions certifying the origin of the deployment.

Response

Response

status_urlstring uri required

The URI to monitor GitHub Pages deployment status.

page_urlstring uri required

The URI to the deployed GitHub Pages.

preview_urlstring uri

The URI to the deployed GitHub Pages preview.

Example response

{
  "status_url": "https://api.github.com/repos/github/hello-world/pages/deployment/status/4fd754f7e594640989b406850d0bc8f06a121251",
  "page_url": "hello-world.github.io",
  "preview_url": "monalisa-1231a2312sa32-23sda74.drafts.github.io"
}