mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
parent
89b4c6de5f
commit
2af9604f13
2
.github/workflows/integration-beta.yml
vendored
2
.github/workflows/integration-beta.yml
vendored
@ -24,6 +24,8 @@ jobs:
|
||||
FOLDER: integration
|
||||
BASE_BRANCH: dev
|
||||
TARGET_FOLDER: montezuma
|
||||
GIT_CONFIG_NAME: Montezuma
|
||||
GIT_CONFIG_EMAIL: montezuma@jamesiv.es
|
||||
|
||||
# Deploys using checkout@v2 with a GITHUB_TOKEN.
|
||||
integration-checkout-v2:
|
||||
|
4
.github/workflows/integration.yml
vendored
4
.github/workflows/integration.yml
vendored
@ -23,6 +23,8 @@ jobs:
|
||||
FOLDER: integration
|
||||
BASE_BRANCH: dev
|
||||
TARGET_FOLDER: montezuma
|
||||
GIT_CONFIG_NAME: Montezuma
|
||||
GIT_CONFIG_EMAIL: montezuma@jamesiv.es
|
||||
|
||||
# Deploys using checkout@v2 with a GITHUB_TOKEN.
|
||||
integration-checkout-v2:
|
||||
@ -31,6 +33,8 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Build and Deploy
|
||||
uses: JamesIves/github-pages-deploy-action@releases/v3
|
||||
|
@ -65,6 +65,8 @@ In addition to the deployment options you must also configure the following.
|
||||
|
||||
| Key | Value Information | Type | Required |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| `GIT_CONFIG_NAME` | Allows you to customize the name that is attached to the GitHub config which is used when pushing the deployment commits. If this is not included it will use the name in the GitHub context, followed by the name of the action. | `with` | **No** |
|
||||
| `GIT_CONFIG_EMAIL` | Allows you to customize the email that is attached to the GitHub config which is used when pushing the deployment commits. If this is not included it will use the email in the GitHub context, followed by a generic noreply GitHub email. | `with` | **No** |
|
||||
| `TARGET_FOLDER` | If you'd like to push the contents of the deployment folder into a specific directory on the deployment branch you can specify it here. | `with` | **No** |
|
||||
| `BASE_BRANCH` | The base branch of your repository which you'd like to checkout prior to deploying. This defaults to the current commit [SHA](http://en.wikipedia.org/wiki/SHA-1) that triggered the build followed by `master` if it doesn't exist. This is useful for making deployments from another branch, and also may be necessary when using a scheduled job. | `with` | **No** |
|
||||
| `COMMIT_MESSAGE` | If you need to customize the commit message for an integration you can do so. | `with` | **No** |
|
||||
|
@ -47,3 +47,11 @@ inputs:
|
||||
CLEAN_EXCLUDE:
|
||||
description: "If you need to use CLEAN but you would like to preserve certain files or folders you can use this option. This should be formatted as an array but stored as a string."
|
||||
required: false
|
||||
|
||||
GIT_CONFIG_NAME:
|
||||
description: "Allows you to customize the name that is attached to the GitHub config which is used when pushing the deployment commits. If this is not included it will use the name in the GitHub context, followed by the name of the action."
|
||||
required: false
|
||||
|
||||
GIT_CONFIG_EMAIL:
|
||||
description: "Allows you to customize the email that is attached to the GitHub config which is used when pushing the deployment commits. If this is not included it will use the email in the GitHub context, followed by a generic noreply GitHub email."
|
||||
required: false
|
@ -9,6 +9,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const core_1 = require("@actions/core");
|
||||
const github = __importStar(require("@actions/github"));
|
||||
const util_1 = require("./util");
|
||||
const { pusher, repository } = github.context.payload;
|
||||
exports.workspace = process.env.GITHUB_WORKSPACE;
|
||||
exports.folder = core_1.getInput("FOLDER", { required: true });
|
||||
@ -25,19 +26,23 @@ exports.action = {
|
||||
defaultBranch: process.env.GITHUB_SHA ? process.env.GITHUB_SHA : "master",
|
||||
isTest: process.env.UNIT_TEST,
|
||||
ssh: core_1.getInput("SSH"),
|
||||
email: pusher && pusher.email
|
||||
? pusher.email
|
||||
: `${process.env.GITHUB_ACTOR ||
|
||||
"github-pages-deploy-action"}@users.noreply.github.com`,
|
||||
email: !util_1.isNullOrUndefined(core_1.getInput("GIT_CONFIG_EMAIL"))
|
||||
? core_1.getInput("GIT_CONFIG_EMAIL")
|
||||
: pusher && pusher.email
|
||||
? pusher.email
|
||||
: `${process.env.GITHUB_ACTOR ||
|
||||
"github-pages-deploy-action"}@users.noreply.github.com`,
|
||||
gitHubRepository: repository && repository.full_name
|
||||
? repository.full_name
|
||||
: process.env.GITHUB_REPOSITORY,
|
||||
gitHubToken: core_1.getInput("GITHUB_TOKEN"),
|
||||
name: pusher && pusher.name
|
||||
? pusher.name
|
||||
: process.env.GITHUB_ACTOR
|
||||
? process.env.GITHUB_ACTOR
|
||||
: "GitHub Pages Deploy Action",
|
||||
name: !util_1.isNullOrUndefined(core_1.getInput("GIT_CONFIG_NAME"))
|
||||
? core_1.getInput("GIT_CONFIG_NAME")
|
||||
: pusher && pusher.name
|
||||
? pusher.name
|
||||
: process.env.GITHUB_ACTOR
|
||||
? process.env.GITHUB_ACTOR
|
||||
: "GitHub Pages Deploy Action",
|
||||
targetFolder: core_1.getInput("TARGET_FOLDER")
|
||||
};
|
||||
// Token Types
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { getInput } from "@actions/core";
|
||||
import * as github from "@actions/github";
|
||||
import { isNullOrUndefined } from "./util";
|
||||
|
||||
const { pusher, repository } = github.context.payload;
|
||||
|
||||
@ -19,22 +20,24 @@ export const action = {
|
||||
defaultBranch: process.env.GITHUB_SHA ? process.env.GITHUB_SHA : "master",
|
||||
isTest: process.env.UNIT_TEST,
|
||||
ssh: getInput("SSH"),
|
||||
email:
|
||||
pusher && pusher.email
|
||||
? pusher.email
|
||||
: `${process.env.GITHUB_ACTOR ||
|
||||
"github-pages-deploy-action"}@users.noreply.github.com`,
|
||||
email: !isNullOrUndefined(getInput("GIT_CONFIG_EMAIL"))
|
||||
? getInput("GIT_CONFIG_EMAIL")
|
||||
: pusher && pusher.email
|
||||
? pusher.email
|
||||
: `${process.env.GITHUB_ACTOR ||
|
||||
"github-pages-deploy-action"}@users.noreply.github.com`,
|
||||
gitHubRepository:
|
||||
repository && repository.full_name
|
||||
? repository.full_name
|
||||
: process.env.GITHUB_REPOSITORY,
|
||||
gitHubToken: getInput("GITHUB_TOKEN"),
|
||||
name:
|
||||
pusher && pusher.name
|
||||
? pusher.name
|
||||
: process.env.GITHUB_ACTOR
|
||||
? process.env.GITHUB_ACTOR
|
||||
: "GitHub Pages Deploy Action",
|
||||
name: !isNullOrUndefined(getInput("GIT_CONFIG_NAME"))
|
||||
? getInput("GIT_CONFIG_NAME")
|
||||
: pusher && pusher.name
|
||||
? pusher.name
|
||||
: process.env.GITHUB_ACTOR
|
||||
? process.env.GITHUB_ACTOR
|
||||
: "GitHub Pages Deploy Action",
|
||||
targetFolder: getInput("TARGET_FOLDER")
|
||||
};
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
"no-implicit-dependencies": true,
|
||||
"no-invalid-this": true,
|
||||
"no-string-throw": true,
|
||||
"no-unsafe-finally": true,
|
||||
"no-unsafe-finally": false,
|
||||
"no-use-before-declare": true,
|
||||
"no-void-expression": [true, "ignore-arrow-function-shorthand"],
|
||||
"no-duplicate-imports": true,
|
||||
|
Loading…
Reference in New Issue
Block a user