mirror of
https://github.com/actions/deploy-pages.git
synced 2025-12-08 16:16:16 +00:00
Merge branch 'main' into upstream-preview-alpha
This commit is contained in:
10
action.yml
10
action.yml
@@ -8,7 +8,7 @@ inputs:
|
|||||||
emit_telemetry:
|
emit_telemetry:
|
||||||
description: 'Should this action only emit build telemetry instead of deploying the build artifact?'
|
description: 'Should this action only emit build telemetry instead of deploying the build artifact?'
|
||||||
required: false
|
required: false
|
||||||
default: "false"
|
default: 'false'
|
||||||
token:
|
token:
|
||||||
description: 'GitHub token'
|
description: 'GitHub token'
|
||||||
default: ${{ github.token }}
|
default: ${{ github.token }}
|
||||||
@@ -16,19 +16,19 @@ inputs:
|
|||||||
timeout:
|
timeout:
|
||||||
description: 'Time in milliseconds after which to timeout and cancel the deployment (default: 10 minutes)'
|
description: 'Time in milliseconds after which to timeout and cancel the deployment (default: 10 minutes)'
|
||||||
required: false
|
required: false
|
||||||
default: "600000"
|
default: '600000'
|
||||||
error_count:
|
error_count:
|
||||||
description: 'Maximum number of status report errors before cancelling a deployment (default: 10)'
|
description: 'Maximum number of status report errors before cancelling a deployment (default: 10)'
|
||||||
required: false
|
required: false
|
||||||
default: "10"
|
default: '10'
|
||||||
reporting_interval:
|
reporting_interval:
|
||||||
description: 'Time in milliseconds between two deployment status report (default: 5 seconds)'
|
description: 'Time in milliseconds between two deployment status report (default: 5 seconds)'
|
||||||
required: false
|
required: false
|
||||||
default: "5000"
|
default: '5000'
|
||||||
artifact_name:
|
artifact_name:
|
||||||
description: 'Name of the artifact to deploy'
|
description: 'Name of the artifact to deploy'
|
||||||
required: false
|
required: false
|
||||||
default: "github-pages"
|
default: 'github-pages'
|
||||||
preview:
|
preview:
|
||||||
description: 'Is this attempting to deploy a pull request as a GitHub Pages preview site? (NOTE: This feature is only in alpha currently and is not available to the public!)'
|
description: 'Is this attempting to deploy a pull request as a GitHub Pages preview site? (NOTE: This feature is only in alpha currently and is not available to the public!)'
|
||||||
required: false
|
required: false
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/paper-spa/deploy-pages.git"
|
"url": "git+https://github.com/actions/deploy-pages.git"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"GitHub",
|
"GitHub",
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
"author": "GitHub",
|
"author": "GitHub",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/paper-spa/deploy-pages/issues"
|
"url": "https://github.com/actions/deploy-pages/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/paper-spa/deploy-pages#readme"
|
"homepage": "https://github.com/actions/deploy-pages#readme"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ describe('with all environment variables set', () => {
|
|||||||
process.env.ACTIONS_RUNTIME_URL = 'my-url'
|
process.env.ACTIONS_RUNTIME_URL = 'my-url'
|
||||||
process.env.GITHUB_RUN_ID = '123'
|
process.env.GITHUB_RUN_ID = '123'
|
||||||
process.env.ACTIONS_RUNTIME_TOKEN = 'a-token'
|
process.env.ACTIONS_RUNTIME_TOKEN = 'a-token'
|
||||||
process.env.GITHUB_REPOSITORY = 'paper-spa/is-awesome'
|
process.env.GITHUB_REPOSITORY = 'actions/is-awesome'
|
||||||
process.env.GITHUB_TOKEN = 'gha-token'
|
process.env.GITHUB_TOKEN = 'gha-token'
|
||||||
process.env.GITHUB_SHA = '123abc'
|
process.env.GITHUB_SHA = '123abc'
|
||||||
process.env.GITHUB_ACTOR = 'monalisa'
|
process.env.GITHUB_ACTOR = 'monalisa'
|
||||||
@@ -54,7 +54,7 @@ describe('create', () => {
|
|||||||
process.env.ACTIONS_RUNTIME_URL = 'http://my-url/'
|
process.env.ACTIONS_RUNTIME_URL = 'http://my-url/'
|
||||||
process.env.GITHUB_RUN_ID = '123'
|
process.env.GITHUB_RUN_ID = '123'
|
||||||
process.env.ACTIONS_RUNTIME_TOKEN = 'a-token'
|
process.env.ACTIONS_RUNTIME_TOKEN = 'a-token'
|
||||||
process.env.GITHUB_REPOSITORY = 'paper-spa/is-awesome'
|
process.env.GITHUB_REPOSITORY = 'actions/is-awesome'
|
||||||
process.env.GITHUB_TOKEN = 'gha-token'
|
process.env.GITHUB_TOKEN = 'gha-token'
|
||||||
process.env.GITHUB_SHA = '123abc'
|
process.env.GITHUB_SHA = '123abc'
|
||||||
process.env.GITHUB_ACTOR = 'monalisa'
|
process.env.GITHUB_ACTOR = 'monalisa'
|
||||||
@@ -106,7 +106,7 @@ describe('create', () => {
|
|||||||
await deployment.create(fakeJwt)
|
await deployment.create(fakeJwt)
|
||||||
|
|
||||||
expect(axios.post).toBeCalledWith(
|
expect(axios.post).toBeCalledWith(
|
||||||
'https://api.github.com/repos/paper-spa/is-awesome/pages/deployment',
|
'https://api.github.com/repos/actions/is-awesome/pages/deployment',
|
||||||
{
|
{
|
||||||
artifact_url: 'https://fake-artifact.com&%24expand=SignedContent',
|
artifact_url: 'https://fake-artifact.com&%24expand=SignedContent',
|
||||||
pages_build_version: 'valid-build-version',
|
pages_build_version: 'valid-build-version',
|
||||||
@@ -189,7 +189,7 @@ describe('create', () => {
|
|||||||
deployment.create()
|
deployment.create()
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
expect(axios.post).toBeCalledWith(
|
expect(axios.post).toBeCalledWith(
|
||||||
'https://api.github.com/repos/paper-spa/is-awesome/pages/deployment',
|
'https://api.github.com/repos/actions/is-awesome/pages/deployment',
|
||||||
{
|
{
|
||||||
artifact_url: 'https://invalid-artifact.com&%24expand=SignedContent',
|
artifact_url: 'https://invalid-artifact.com&%24expand=SignedContent',
|
||||||
pages_build_version: 'invalid-build-version'
|
pages_build_version: 'invalid-build-version'
|
||||||
@@ -216,7 +216,7 @@ describe('check', () => {
|
|||||||
process.env.ACTIONS_RUNTIME_URL = 'http://my-url/'
|
process.env.ACTIONS_RUNTIME_URL = 'http://my-url/'
|
||||||
process.env.GITHUB_RUN_ID = '123'
|
process.env.GITHUB_RUN_ID = '123'
|
||||||
process.env.ACTIONS_RUNTIME_TOKEN = 'a-token'
|
process.env.ACTIONS_RUNTIME_TOKEN = 'a-token'
|
||||||
process.env.GITHUB_REPOSITORY = 'paper-spa/is-awesome'
|
process.env.GITHUB_REPOSITORY = 'actions/is-awesome'
|
||||||
process.env.GITHUB_TOKEN = 'gha-token'
|
process.env.GITHUB_TOKEN = 'gha-token'
|
||||||
process.env.GITHUB_SHA = '123abc'
|
process.env.GITHUB_SHA = '123abc'
|
||||||
process.env.GITHUB_ACTOR = 'monalisa'
|
process.env.GITHUB_ACTOR = 'monalisa'
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ describe('emitTelemetry', () => {
|
|||||||
process.env.ACTIONS_RUNTIME_URL = 'my-url'
|
process.env.ACTIONS_RUNTIME_URL = 'my-url'
|
||||||
process.env.GITHUB_RUN_ID = '123'
|
process.env.GITHUB_RUN_ID = '123'
|
||||||
process.env.ACTIONS_RUNTIME_TOKEN = 'a-token'
|
process.env.ACTIONS_RUNTIME_TOKEN = 'a-token'
|
||||||
process.env.GITHUB_REPOSITORY = 'paper-spa/is-awesome'
|
process.env.GITHUB_REPOSITORY = 'actions/is-awesome'
|
||||||
process.env.GITHUB_TOKEN = 'gha-token'
|
process.env.GITHUB_TOKEN = 'gha-token'
|
||||||
process.env.GITHUB_SHA = '123abc'
|
process.env.GITHUB_SHA = '123abc'
|
||||||
process.env.GITHUB_ACTOR = 'monalisa'
|
process.env.GITHUB_ACTOR = 'monalisa'
|
||||||
@@ -45,7 +45,7 @@ describe('emitTelemetry', () => {
|
|||||||
emitTelemetry()
|
emitTelemetry()
|
||||||
|
|
||||||
expect(axios.post).toBeCalledWith(
|
expect(axios.post).toBeCalledWith(
|
||||||
'https://api.github.com/repos/paper-spa/is-awesome/pages/telemetry',
|
'https://api.github.com/repos/actions/is-awesome/pages/telemetry',
|
||||||
{
|
{
|
||||||
github_run_id: process.env.GITHUB_RUN_ID
|
github_run_id: process.env.GITHUB_RUN_ID
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user