mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
Merge branch 'dev' into releases/v3
This commit is contained in:
commit
0da2cb4986
8
.github/ISSUE_TEMPLATE/BUG_REPORT.md
vendored
8
.github/ISSUE_TEMPLATE/BUG_REPORT.md
vendored
@ -13,13 +13,9 @@ about: Create a bug report to help us improve the action.
|
||||
> Steps to reproduce the behavior.
|
||||
|
||||
|
||||
**Expected behavior**
|
||||
**Logs**
|
||||
|
||||
> Please provide a clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
|
||||
> If applicable, add screenshots to help explain your problem.
|
||||
> Please provide your deployment logs and a link to your workflow file.
|
||||
|
||||
|
||||
**Additional Comments**
|
||||
|
4
.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
vendored
4
.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
vendored
@ -6,7 +6,7 @@ about: If you'd like to make a suggestion please fill out the form below.
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
|
||||
> Please provide a clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
> Please provide a clear and concise description of what the problem is.
|
||||
|
||||
**Describe the solution you'd like**
|
||||
|
||||
@ -14,4 +14,4 @@ about: If you'd like to make a suggestion please fill out the form below.
|
||||
|
||||
**Additional Comments**
|
||||
|
||||
> Add any other context or screenshots about the feature request here.
|
||||
> Add any other context about the feature request here.
|
||||
|
18
.github/ISSUE_TEMPLATE/SUPPORT.md
vendored
Normal file
18
.github/ISSUE_TEMPLATE/SUPPORT.md
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
name: Support
|
||||
about: If you're having problems setting up the action you can make a request for support here.
|
||||
|
||||
---
|
||||
|
||||
**Describe the Issue**
|
||||
|
||||
> Please provide a clear and concise description of what the problem is.
|
||||
|
||||
**Logs**
|
||||
|
||||
> Please provide your deployment logs and a link to your workflow file.
|
||||
|
||||
|
||||
**Additional Comments**
|
||||
|
||||
> Add any other context about the issue here.
|
@ -107,7 +107,7 @@ Below you'll find a description of what each option does.
|
||||
| `BRANCH` | This is the branch you wish to deploy to, for example `gh-pages` or `docs`. | `with` | **Yes** |
|
||||
| `FOLDER` | The folder in your repository that you want to deploy. If your build script compiles into a directory named `build` you'd put it here. **Folder paths cannot have a leading `/` or `./`**. If you wish to deploy the root directory you can place a `.` here. | `with` | **Yes** |
|
||||
| `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`. This is useful for making deployments from another branch, and also may be neccersary when using a scheduled job. | `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 neccersary when using a scheduled job. | `with` | **No** |
|
||||
| `CLEAN` | If your project generates hashed files on build you can use this option to automatically delete them from the deployment branch with each deploy. This option can be toggled on by setting it to `true`. | `with` | **No** |
|
||||
| `CLEAN_EXCLUDE` | If you need to use `CLEAN` but you'd like to preserve certain files or folders you can use this option. This should be formatted as an array but stored as a string. For example: `'["filename.js", "folder"]'` | `with` | **No** |
|
||||
|
||||
|
@ -30,7 +30,7 @@ describe("git", () => {
|
||||
});
|
||||
|
||||
const call = await init();
|
||||
expect(execute).toBeCalledTimes(3);
|
||||
expect(execute).toBeCalledTimes(4);
|
||||
expect(call).toBe("Initialization step complete...");
|
||||
});
|
||||
|
||||
@ -46,7 +46,7 @@ describe("git", () => {
|
||||
|
||||
const call = await init();
|
||||
|
||||
expect(execute).toBeCalledTimes(3);
|
||||
expect(execute).toBeCalledTimes(4);
|
||||
expect(call).toBe("Initialization step complete...");
|
||||
});
|
||||
|
||||
@ -109,7 +109,7 @@ describe("git", () => {
|
||||
|
||||
const call = await init();
|
||||
|
||||
expect(execute).toBeCalledTimes(3);
|
||||
expect(execute).toBeCalledTimes(4);
|
||||
expect(call).toBe("Initialization step complete...");
|
||||
});
|
||||
});
|
||||
|
@ -68,7 +68,6 @@ function generateBranch() {
|
||||
yield util_1.execute(`git reset --hard`, constants_1.workspace);
|
||||
yield util_1.execute(`git commit --allow-empty -m "Initial ${constants_1.action.branch} commit."`, constants_1.workspace);
|
||||
yield util_1.execute(`git push ${constants_1.repositoryPath} ${constants_1.action.branch}`, constants_1.workspace);
|
||||
// Switches back to the base branch.
|
||||
yield switchToBaseBranch();
|
||||
}
|
||||
catch (error) {
|
||||
@ -98,7 +97,7 @@ function deploy() {
|
||||
}
|
||||
// Checks out the base branch to begin the deployment process.
|
||||
yield switchToBaseBranch();
|
||||
yield util_1.execute(`git fetch ${constants_1.repositoryPath}`, constants_1.workspace);
|
||||
yield util_1.execute(`git fetch origin`, constants_1.workspace);
|
||||
yield util_1.execute(`git worktree add --checkout ${temporaryDeploymentDirectory} origin/${constants_1.action.branch}`, constants_1.workspace);
|
||||
// Ensures that items that need to be excluded from the clean job get parsed.
|
||||
let excludes = "";
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "github-pages-deploy-action",
|
||||
"description": "GitHub action for building a project and deploying it to GitHub pages.",
|
||||
"private": true,
|
||||
"version": "3.1.1",
|
||||
"main": "lib/main.js",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
@ -37,8 +37,8 @@
|
||||
"@actions/github": "^2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^24.0.24",
|
||||
"@types/node": "^12.12.21",
|
||||
"@types/jest": "^24.0.25",
|
||||
"@types/node": "^13.1.2",
|
||||
"jest": "^24.8.0",
|
||||
"jest-circus": "^24.7.1",
|
||||
"lodash": "^4.17.15",
|
||||
|
@ -22,6 +22,7 @@ export async function init(): Promise<any> {
|
||||
await execute(`git init`, workspace);
|
||||
await execute(`git config user.name ${action.name}`, workspace);
|
||||
await execute(`git config user.email ${action.email}`, workspace);
|
||||
await execute(`git fetch origin`, workspace);
|
||||
} catch (error) {
|
||||
core.setFailed(`There was an error initializing the repository: ${error}`);
|
||||
} finally {
|
||||
@ -88,7 +89,7 @@ export async function deploy(): Promise<any> {
|
||||
|
||||
// Checks out the base branch to begin the deployment process.
|
||||
await switchToBaseBranch();
|
||||
await execute(`git fetch ${repositoryPath}`, workspace);
|
||||
await execute(`git fetch origin`, workspace);
|
||||
await execute(
|
||||
`git worktree add --checkout ${temporaryDeploymentDirectory} origin/${action.branch}`,
|
||||
workspace
|
||||
|
16
yarn.lock
16
yarn.lock
@ -388,15 +388,15 @@
|
||||
"@types/istanbul-lib-coverage" "*"
|
||||
"@types/istanbul-lib-report" "*"
|
||||
|
||||
"@types/jest@^24.0.24":
|
||||
version "24.0.24"
|
||||
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-24.0.24.tgz#0f2f523dc77cc1bc6bef34eaf287ede887a73f05"
|
||||
"@types/jest@^24.0.25":
|
||||
version "24.0.25"
|
||||
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-24.0.25.tgz#2aba377824ce040114aa906ad2cac2c85351360f"
|
||||
dependencies:
|
||||
jest-diff "^24.3.0"
|
||||
|
||||
"@types/node@>= 8", "@types/node@^12.12.21":
|
||||
version "12.12.21"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.21.tgz#aa44a6363291c7037111c47e4661ad210aded23f"
|
||||
"@types/node@>= 8", "@types/node@^13.1.2":
|
||||
version "13.1.4"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-13.1.4.tgz#4cfd90175a200ee9b02bd6b1cd19bc349741607e"
|
||||
|
||||
"@types/stack-utils@^1.0.1":
|
||||
version "1.0.1"
|
||||
@ -3082,8 +3082,8 @@ tr46@^1.0.1:
|
||||
punycode "^2.1.0"
|
||||
|
||||
ts-jest@^24.2.0:
|
||||
version "24.2.0"
|
||||
resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-24.2.0.tgz#7abca28c2b4b0a1fdd715cd667d65d047ea4e768"
|
||||
version "24.3.0"
|
||||
resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-24.3.0.tgz#b97814e3eab359ea840a1ac112deae68aa440869"
|
||||
dependencies:
|
||||
bs-logger "0.x"
|
||||
buffer-from "1.x"
|
||||
|
Loading…
Reference in New Issue
Block a user