Skip to content

Commit 0ead9cc

Browse files
committed
feat: add support for new "create Pages deployment" API (createPagesDeployment)
1 parent b4ce9a1 commit 0ead9cc

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

src/generated/endpoints.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,6 +1183,7 @@ const Endpoints: EndpointsDefaultsAndDecorations = {
11831183
"PUT /repos/{owner}/{repo}/environments/{environment_name}",
11841184
],
11851185
createOrUpdateFileContents: ["PUT /repos/{owner}/{repo}/contents/{path}"],
1186+
createPagesDeployment: ["POST /repos/{owner}/{repo}/pages/deployment"],
11861187
createPagesSite: ["POST /repos/{owner}/{repo}/pages"],
11871188
createRelease: ["POST /repos/{owner}/{repo}/releases"],
11881189
createTagProtection: ["POST /repos/{owner}/{repo}/tags/protection"],

src/generated/method-types.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8202,6 +8202,20 @@ export type RestEndpointMethods = {
82028202
defaults: RequestInterface["defaults"];
82038203
endpoint: EndpointInterface<{ url: string }>;
82048204
};
8205+
/**
8206+
* Create a GitHub Pages deployment for a repository.
8207+
*
8208+
* Users must have write permissions. GitHub Apps must have the `pages:write` permission to use this endpoint.
8209+
*/
8210+
createPagesDeployment: {
8211+
(
8212+
params?: RestEndpointMethodTypes["repos"]["createPagesDeployment"]["parameters"]
8213+
): Promise<
8214+
RestEndpointMethodTypes["repos"]["createPagesDeployment"]["response"]
8215+
>;
8216+
defaults: RequestInterface["defaults"];
8217+
endpoint: EndpointInterface<{ url: string }>;
8218+
};
82058219
/**
82068220
* Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)."
82078221
*/

src/generated/parameters-and-response-types.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4520,6 +4520,14 @@ export type RestEndpointMethodTypes = {
45204520
>;
45214521
response: Endpoints["PUT /repos/{owner}/{repo}/contents/{path}"]["response"];
45224522
};
4523+
createPagesDeployment: {
4524+
parameters: RequestParameters &
4525+
Omit<
4526+
Endpoints["POST /repos/{owner}/{repo}/pages/deployment"]["parameters"],
4527+
"baseUrl" | "headers" | "mediaType"
4528+
>;
4529+
response: Endpoints["POST /repos/{owner}/{repo}/pages/deployment"]["response"];
4530+
};
45234531
createPagesSite: {
45244532
parameters: RequestParameters &
45254533
Omit<

0 commit comments

Comments
 (0)