@@ -100,13 +100,13 @@ describe('Deployment', () => {
100
100
} )
101
101
102
102
const createDeploymentScope = nock ( 'https://api.github.com' )
103
- . post ( `/repos/${ process . env . GITHUB_REPOSITORY } /pages/deployment ` , {
103
+ . post ( `/repos/${ process . env . GITHUB_REPOSITORY } /pages/deployments ` , {
104
104
artifact_url : 'https://fake-artifact.com&%24expand=SignedContent' ,
105
105
pages_build_version : process . env . GITHUB_SHA ,
106
106
oidc_token : fakeJwt
107
107
} )
108
108
. reply ( 200 , {
109
- status_url : `https://api.github.com/repos/${ process . env . GITHUB_REPOSITORY } /pages/deployment/status /${ process . env . GITHUB_SHA } ` ,
109
+ status_url : `https://api.github.com/repos/${ process . env . GITHUB_REPOSITORY } /pages/deployments /${ process . env . GITHUB_SHA } ` ,
110
110
page_url : 'https://actions.github.io/is-awesome'
111
111
} )
112
112
@@ -138,14 +138,14 @@ describe('Deployment', () => {
138
138
} )
139
139
140
140
const createDeploymentScope = nock ( 'https://api.github.com' )
141
- . post ( `/repos/${ process . env . GITHUB_REPOSITORY } /pages/deployment ` , {
141
+ . post ( `/repos/${ process . env . GITHUB_REPOSITORY } /pages/deployments ` , {
142
142
artifact_url : 'https://fake-artifact.com&%24expand=SignedContent' ,
143
143
pages_build_version : process . env . GITHUB_SHA ,
144
144
oidc_token : fakeJwt ,
145
145
preview : true
146
146
} )
147
147
. reply ( 200 , {
148
- status_url : `https://api.github.com/repos/${ process . env . GITHUB_REPOSITORY } /pages/deployment/status /${ process . env . GITHUB_SHA } ` ,
148
+ status_url : `https://api.github.com/repos/${ process . env . GITHUB_REPOSITORY } /pages/deployments /${ process . env . GITHUB_SHA } ` ,
149
149
page_url : 'https://actions.github.io/is-awesome' ,
150
150
preview_url : 'https://actions.drafts.github.io/is-awesome'
151
151
} )
@@ -192,7 +192,7 @@ describe('Deployment', () => {
192
192
. reply ( 200 , { value : [ { url : 'https://invalid-artifact.com' , name : 'github-pages' } ] } )
193
193
194
194
const createDeploymentScope = nock ( 'https://api.github.com' )
195
- . post ( `/repos/${ process . env . GITHUB_REPOSITORY } /pages/deployment ` , {
195
+ . post ( `/repos/${ process . env . GITHUB_REPOSITORY } /pages/deployments ` , {
196
196
artifact_url : 'https://invalid-artifact.com&%24expand=SignedContent' ,
197
197
pages_build_version : process . env . GITHUB_SHA
198
198
} )
@@ -225,18 +225,18 @@ describe('Deployment', () => {
225
225
} )
226
226
227
227
const createDeploymentScope = nock ( 'https://api.github.com' )
228
- . post ( `/repos/${ process . env . GITHUB_REPOSITORY } /pages/deployment ` , {
228
+ . post ( `/repos/${ process . env . GITHUB_REPOSITORY } /pages/deployments ` , {
229
229
artifact_url : 'https://fake-artifact.com&%24expand=SignedContent' ,
230
230
pages_build_version : process . env . GITHUB_SHA ,
231
231
oidc_token : fakeJwt
232
232
} )
233
233
. reply ( 200 , {
234
- status_url : `https://api.github.com/repos/${ process . env . GITHUB_REPOSITORY } /pages/deployment/status /${ process . env . GITHUB_SHA } ` ,
234
+ status_url : `https://api.github.com/repos/${ process . env . GITHUB_REPOSITORY } /pages/deployments /${ process . env . GITHUB_SHA } ` ,
235
235
page_url : 'https://actions.github.io/is-awesome'
236
236
} )
237
237
238
238
const deploymentStatusScope = nock ( 'https://api.github.com' )
239
- . get ( `/repos/${ process . env . GITHUB_REPOSITORY } /pages/deployment/status /${ process . env . GITHUB_SHA } ` )
239
+ . get ( `/repos/${ process . env . GITHUB_REPOSITORY } /pages/deployments /${ process . env . GITHUB_SHA } ` )
240
240
. reply ( 200 , {
241
241
status : 'succeed'
242
242
} )
@@ -279,18 +279,18 @@ describe('Deployment', () => {
279
279
} )
280
280
281
281
const createDeploymentScope = nock ( 'https://api.github.com' )
282
- . post ( `/repos/${ process . env . GITHUB_REPOSITORY } /pages/deployment ` , {
282
+ . post ( `/repos/${ process . env . GITHUB_REPOSITORY } /pages/deployments ` , {
283
283
artifact_url : 'https://fake-artifact.com&%24expand=SignedContent' ,
284
284
pages_build_version : process . env . GITHUB_SHA ,
285
285
oidc_token : fakeJwt
286
286
} )
287
287
. reply ( 200 , {
288
- status_url : `https://api.github.com/repos/${ process . env . GITHUB_REPOSITORY } /pages/deployment/status /${ process . env . GITHUB_SHA } ` ,
288
+ status_url : `https://api.github.com/repos/${ process . env . GITHUB_REPOSITORY } /pages/deployments /${ process . env . GITHUB_SHA } ` ,
289
289
page_url : 'https://actions.github.io/is-awesome'
290
290
} )
291
291
292
292
const cancelDeploymentScope = nock ( 'https://api.github.com' )
293
- . put ( `/repos/${ process . env . GITHUB_REPOSITORY } /pages/deployment/cancel/ ${ process . env . GITHUB_SHA } ` )
293
+ . post ( `/repos/${ process . env . GITHUB_REPOSITORY } /pages/deployments/ ${ process . env . GITHUB_SHA } /cancel ` )
294
294
. reply ( 200 , { } )
295
295
296
296
core . getIDToken = jest . fn ( ) . mockResolvedValue ( fakeJwt )
0 commit comments