2020-03-05 21:19:45 +08:00
import { getInput } from '@actions/core'
import * as github from '@actions/github'
2021-03-04 21:47:44 +08:00
import { isNullOrUndefined , stripProtocolFromUrl } from './util'
2019-11-19 23:06:27 +08:00
2020-03-05 21:19:45 +08:00
const { pusher , repository } = github . context . payload
2019-11-19 23:06:27 +08:00
[Release] Version 4 (#589)
* Stop checking out workspace (#515)
* Stop checking out base branch before deployment, drop option.
* Don't check out default branch, as we don't check out base branch, drop option.
* Don't stash/unstash as we don't update the workdir, drop preserve option.
* Don't init the workspace
* Only fetch the remote branch if it exists, only with depth 1.
* Rely on previous checkouts to have handled lfs files correctly, drop option.
* Update README, action.yml, integration tests
* Set up eslint for test files. (#517)
* Add DRY_RUN option, passing --dry-run to git push. (#526)
See #499 for the proposal.
* Simplifies Token Setup (#530)
* Token simplification
* Access Token / Github Token -> Token
* Oops
* Typos
* Update README.md
* Update README.md
* Update action.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Adjust codeql action to latest recommendations (#540)
Also, add the dev and release branches, and drop master.
* Add workflow to update build and node_modules on release branches (#541)
* Stores username/email in secrets
* Removing stale bot integration
* Test current code base as an integration test for PRs and pushes (#505)
* Add a build step to create lib and node_modules artifact
* Run integration test with built dist and current SHA as base
For pull requests, the github.sha is the sha of the merge to the
target branch, not the head of the PR. Special case that.
* Use v2 checkout, and DRY_RUN for the integration test.
I also made the branches more generic, as there are now more of them.
* Fix #536, don't push at all on dryRun
Also add tests for dryRun and singleCommit and generateBranch
code flows.
* Try to fix dryRun on new remote branches, refactor fetch
* Try to fix dryRun, only fetch if origin branch exists
* Refactor worktree setup to include branch generation and setup for singleCommit
This is a continuation of the no-checkout work, and sadly suggested pretty
intensive changes.
* Set up git config to fix tests, also make debugging easier
* Add matrix for existing and non-existing branch
* Add matrix for singleCommit and not
* Drop GITHUB_TOKEN, add DRY_RUN to action.yml
* When deploying existing branch, add a modifcation and deploy again
* Force branch checkout to work in redeployment scenarios
* Make singleCommit easier to see in job descriptions
* Review comments
* Add a test-only property to action to test code paths with remote branch.
* Introduce TestFlag enum to signal different test scenarios to unit tests
* Fix util.test.ts
* Update worktree.ts
* Fix a few nits in tests and automation. Don't try to wordcount ls-rem… (#546)
* Fix a few nits in tests and automation. Don't try to wordcount ls-remote.
Nits in tests are around undoing changes made to the environment,
and to not modify the checkout.
* Describe suite with empty SHA
* Lowercase Inputs (#547)
* Lowercases inputs
* Adjusts workflow tests and deployment_status
* Use multi-line string for clean-exclude patterns. (#553)
As this change is subtle, I'm taking the opportunity to change
the underscore for the hyphen, which makes it less likely that
users of this action will just pass in an old json array.
* Hyphenate inputs and outputs, add step output, fix #558 (#559)
* Hyphenate inputs and outputs, add step output, fix #558
I've also tried to make the clean docs a bit clearer, and consistent
about clean being on my default. Still not totally happy with the intro
of the docs there, though.
* Add testing of step outputs to build integration tests
* Security Docs
* Integration tests
* Revert "Integration tests"
This reverts commit 639ff537d5bf88b668efb3a56d361e2a03f008c9.
* Native SSH Key Support (#569)
* SSH Key Support :key:
* Update ssh.ts
* Update src/ssh.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* README fixes/etc
* Unit Tests & README
* ssh key
* Update README.md
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update integration.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Deployment Issues (#583)
* Update git.ts
* Tests
* Update git.ts
* Formatting
* Update src/git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* TestFlag
* Logging
* Update git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* Codespace Support (#584)
* Add files via upload
* Update README.md
* Add files via upload
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* SSH Issues (#588)
* Unsets Persisted Credentials (#587)
* Persist
* Config Setup/Tests
* Assets
* Update git.ts
* Spacing
* Update integration.yml
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
2021-02-06 11:05:18 +08:00
/* Flags to signal different scenarios to test cases */
export enum TestFlag {
NONE = 0 ,
HAS_CHANGED_FILES = 1 << 1 , // Assume changes to commit.
HAS_REMOTE_BRANCH = 1 << 2 , // Assume remote repository has existing commits.
UNABLE_TO_REMOVE_ORIGIN = 1 << 3 , // Assume we can't remove origin.
UNABLE_TO_UNSET_GIT_CONFIG = 1 << 4 // Assume we can't remove previously set git configs.
}
2020-03-02 20:52:38 +08:00
/* For more information please refer to the README: https://github.com/JamesIves/github-pages-deploy-action */
2020-03-07 11:36:56 +08:00
export interface ActionInterface {
2020-03-02 20:52:38 +08:00
/** The branch that the action should deploy to. */
2020-03-05 21:19:45 +08:00
branch : string
[Release] Version 4 (#589)
* Stop checking out workspace (#515)
* Stop checking out base branch before deployment, drop option.
* Don't check out default branch, as we don't check out base branch, drop option.
* Don't stash/unstash as we don't update the workdir, drop preserve option.
* Don't init the workspace
* Only fetch the remote branch if it exists, only with depth 1.
* Rely on previous checkouts to have handled lfs files correctly, drop option.
* Update README, action.yml, integration tests
* Set up eslint for test files. (#517)
* Add DRY_RUN option, passing --dry-run to git push. (#526)
See #499 for the proposal.
* Simplifies Token Setup (#530)
* Token simplification
* Access Token / Github Token -> Token
* Oops
* Typos
* Update README.md
* Update README.md
* Update action.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Adjust codeql action to latest recommendations (#540)
Also, add the dev and release branches, and drop master.
* Add workflow to update build and node_modules on release branches (#541)
* Stores username/email in secrets
* Removing stale bot integration
* Test current code base as an integration test for PRs and pushes (#505)
* Add a build step to create lib and node_modules artifact
* Run integration test with built dist and current SHA as base
For pull requests, the github.sha is the sha of the merge to the
target branch, not the head of the PR. Special case that.
* Use v2 checkout, and DRY_RUN for the integration test.
I also made the branches more generic, as there are now more of them.
* Fix #536, don't push at all on dryRun
Also add tests for dryRun and singleCommit and generateBranch
code flows.
* Try to fix dryRun on new remote branches, refactor fetch
* Try to fix dryRun, only fetch if origin branch exists
* Refactor worktree setup to include branch generation and setup for singleCommit
This is a continuation of the no-checkout work, and sadly suggested pretty
intensive changes.
* Set up git config to fix tests, also make debugging easier
* Add matrix for existing and non-existing branch
* Add matrix for singleCommit and not
* Drop GITHUB_TOKEN, add DRY_RUN to action.yml
* When deploying existing branch, add a modifcation and deploy again
* Force branch checkout to work in redeployment scenarios
* Make singleCommit easier to see in job descriptions
* Review comments
* Add a test-only property to action to test code paths with remote branch.
* Introduce TestFlag enum to signal different test scenarios to unit tests
* Fix util.test.ts
* Update worktree.ts
* Fix a few nits in tests and automation. Don't try to wordcount ls-rem… (#546)
* Fix a few nits in tests and automation. Don't try to wordcount ls-remote.
Nits in tests are around undoing changes made to the environment,
and to not modify the checkout.
* Describe suite with empty SHA
* Lowercase Inputs (#547)
* Lowercases inputs
* Adjusts workflow tests and deployment_status
* Use multi-line string for clean-exclude patterns. (#553)
As this change is subtle, I'm taking the opportunity to change
the underscore for the hyphen, which makes it less likely that
users of this action will just pass in an old json array.
* Hyphenate inputs and outputs, add step output, fix #558 (#559)
* Hyphenate inputs and outputs, add step output, fix #558
I've also tried to make the clean docs a bit clearer, and consistent
about clean being on my default. Still not totally happy with the intro
of the docs there, though.
* Add testing of step outputs to build integration tests
* Security Docs
* Integration tests
* Revert "Integration tests"
This reverts commit 639ff537d5bf88b668efb3a56d361e2a03f008c9.
* Native SSH Key Support (#569)
* SSH Key Support :key:
* Update ssh.ts
* Update src/ssh.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* README fixes/etc
* Unit Tests & README
* ssh key
* Update README.md
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update integration.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Deployment Issues (#583)
* Update git.ts
* Tests
* Update git.ts
* Formatting
* Update src/git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* TestFlag
* Logging
* Update git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* Codespace Support (#584)
* Add files via upload
* Update README.md
* Add files via upload
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* SSH Issues (#588)
* Unsets Persisted Credentials (#587)
* Persist
* Config Setup/Tests
* Assets
* Update git.ts
* Spacing
* Update integration.yml
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
2021-02-06 11:05:18 +08:00
/** git push with --dry-run */
dryRun? : boolean | null
2020-03-02 20:52:38 +08:00
/** 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. */
2020-03-29 01:27:15 +08:00
clean? : boolean | null
2020-03-02 20:52:38 +08:00
/** If you need to use CLEAN but you'd like to preserve certain files or folders you can use this option. */
[Release] Version 4 (#589)
* Stop checking out workspace (#515)
* Stop checking out base branch before deployment, drop option.
* Don't check out default branch, as we don't check out base branch, drop option.
* Don't stash/unstash as we don't update the workdir, drop preserve option.
* Don't init the workspace
* Only fetch the remote branch if it exists, only with depth 1.
* Rely on previous checkouts to have handled lfs files correctly, drop option.
* Update README, action.yml, integration tests
* Set up eslint for test files. (#517)
* Add DRY_RUN option, passing --dry-run to git push. (#526)
See #499 for the proposal.
* Simplifies Token Setup (#530)
* Token simplification
* Access Token / Github Token -> Token
* Oops
* Typos
* Update README.md
* Update README.md
* Update action.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Adjust codeql action to latest recommendations (#540)
Also, add the dev and release branches, and drop master.
* Add workflow to update build and node_modules on release branches (#541)
* Stores username/email in secrets
* Removing stale bot integration
* Test current code base as an integration test for PRs and pushes (#505)
* Add a build step to create lib and node_modules artifact
* Run integration test with built dist and current SHA as base
For pull requests, the github.sha is the sha of the merge to the
target branch, not the head of the PR. Special case that.
* Use v2 checkout, and DRY_RUN for the integration test.
I also made the branches more generic, as there are now more of them.
* Fix #536, don't push at all on dryRun
Also add tests for dryRun and singleCommit and generateBranch
code flows.
* Try to fix dryRun on new remote branches, refactor fetch
* Try to fix dryRun, only fetch if origin branch exists
* Refactor worktree setup to include branch generation and setup for singleCommit
This is a continuation of the no-checkout work, and sadly suggested pretty
intensive changes.
* Set up git config to fix tests, also make debugging easier
* Add matrix for existing and non-existing branch
* Add matrix for singleCommit and not
* Drop GITHUB_TOKEN, add DRY_RUN to action.yml
* When deploying existing branch, add a modifcation and deploy again
* Force branch checkout to work in redeployment scenarios
* Make singleCommit easier to see in job descriptions
* Review comments
* Add a test-only property to action to test code paths with remote branch.
* Introduce TestFlag enum to signal different test scenarios to unit tests
* Fix util.test.ts
* Update worktree.ts
* Fix a few nits in tests and automation. Don't try to wordcount ls-rem… (#546)
* Fix a few nits in tests and automation. Don't try to wordcount ls-remote.
Nits in tests are around undoing changes made to the environment,
and to not modify the checkout.
* Describe suite with empty SHA
* Lowercase Inputs (#547)
* Lowercases inputs
* Adjusts workflow tests and deployment_status
* Use multi-line string for clean-exclude patterns. (#553)
As this change is subtle, I'm taking the opportunity to change
the underscore for the hyphen, which makes it less likely that
users of this action will just pass in an old json array.
* Hyphenate inputs and outputs, add step output, fix #558 (#559)
* Hyphenate inputs and outputs, add step output, fix #558
I've also tried to make the clean docs a bit clearer, and consistent
about clean being on my default. Still not totally happy with the intro
of the docs there, though.
* Add testing of step outputs to build integration tests
* Security Docs
* Integration tests
* Revert "Integration tests"
This reverts commit 639ff537d5bf88b668efb3a56d361e2a03f008c9.
* Native SSH Key Support (#569)
* SSH Key Support :key:
* Update ssh.ts
* Update src/ssh.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* README fixes/etc
* Unit Tests & README
* ssh key
* Update README.md
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update integration.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Deployment Issues (#583)
* Update git.ts
* Tests
* Update git.ts
* Formatting
* Update src/git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* TestFlag
* Logging
* Update git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* Codespace Support (#584)
* Add files via upload
* Update README.md
* Add files via upload
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* SSH Issues (#588)
* Unsets Persisted Credentials (#587)
* Persist
* Config Setup/Tests
* Assets
* Update git.ts
* Spacing
* Update integration.yml
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
2021-02-06 11:05:18 +08:00
cleanExclude? : string [ ]
2020-03-02 20:52:38 +08:00
/** If you need to customize the commit message for an integration you can do so. */
2020-03-05 21:19:45 +08:00
commitMessage? : string
2021-03-04 21:47:44 +08:00
/** The hostname of which the GitHub Workflow is being run on, ie: github.com */
hostname? : string
2020-03-02 20:52:38 +08:00
/** The git config email. */
2020-03-05 21:19:45 +08:00
email? : string
2020-03-02 20:52:38 +08:00
/** The folder to deploy. */
2020-03-05 21:19:45 +08:00
folder : string
2020-10-17 23:47:44 +08:00
/** The auto generated folder path. */
2020-10-15 22:20:15 +08:00
folderPath? : string
[Release] Version 4 (#589)
* Stop checking out workspace (#515)
* Stop checking out base branch before deployment, drop option.
* Don't check out default branch, as we don't check out base branch, drop option.
* Don't stash/unstash as we don't update the workdir, drop preserve option.
* Don't init the workspace
* Only fetch the remote branch if it exists, only with depth 1.
* Rely on previous checkouts to have handled lfs files correctly, drop option.
* Update README, action.yml, integration tests
* Set up eslint for test files. (#517)
* Add DRY_RUN option, passing --dry-run to git push. (#526)
See #499 for the proposal.
* Simplifies Token Setup (#530)
* Token simplification
* Access Token / Github Token -> Token
* Oops
* Typos
* Update README.md
* Update README.md
* Update action.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Adjust codeql action to latest recommendations (#540)
Also, add the dev and release branches, and drop master.
* Add workflow to update build and node_modules on release branches (#541)
* Stores username/email in secrets
* Removing stale bot integration
* Test current code base as an integration test for PRs and pushes (#505)
* Add a build step to create lib and node_modules artifact
* Run integration test with built dist and current SHA as base
For pull requests, the github.sha is the sha of the merge to the
target branch, not the head of the PR. Special case that.
* Use v2 checkout, and DRY_RUN for the integration test.
I also made the branches more generic, as there are now more of them.
* Fix #536, don't push at all on dryRun
Also add tests for dryRun and singleCommit and generateBranch
code flows.
* Try to fix dryRun on new remote branches, refactor fetch
* Try to fix dryRun, only fetch if origin branch exists
* Refactor worktree setup to include branch generation and setup for singleCommit
This is a continuation of the no-checkout work, and sadly suggested pretty
intensive changes.
* Set up git config to fix tests, also make debugging easier
* Add matrix for existing and non-existing branch
* Add matrix for singleCommit and not
* Drop GITHUB_TOKEN, add DRY_RUN to action.yml
* When deploying existing branch, add a modifcation and deploy again
* Force branch checkout to work in redeployment scenarios
* Make singleCommit easier to see in job descriptions
* Review comments
* Add a test-only property to action to test code paths with remote branch.
* Introduce TestFlag enum to signal different test scenarios to unit tests
* Fix util.test.ts
* Update worktree.ts
* Fix a few nits in tests and automation. Don't try to wordcount ls-rem… (#546)
* Fix a few nits in tests and automation. Don't try to wordcount ls-remote.
Nits in tests are around undoing changes made to the environment,
and to not modify the checkout.
* Describe suite with empty SHA
* Lowercase Inputs (#547)
* Lowercases inputs
* Adjusts workflow tests and deployment_status
* Use multi-line string for clean-exclude patterns. (#553)
As this change is subtle, I'm taking the opportunity to change
the underscore for the hyphen, which makes it less likely that
users of this action will just pass in an old json array.
* Hyphenate inputs and outputs, add step output, fix #558 (#559)
* Hyphenate inputs and outputs, add step output, fix #558
I've also tried to make the clean docs a bit clearer, and consistent
about clean being on my default. Still not totally happy with the intro
of the docs there, though.
* Add testing of step outputs to build integration tests
* Security Docs
* Integration tests
* Revert "Integration tests"
This reverts commit 639ff537d5bf88b668efb3a56d361e2a03f008c9.
* Native SSH Key Support (#569)
* SSH Key Support :key:
* Update ssh.ts
* Update src/ssh.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* README fixes/etc
* Unit Tests & README
* ssh key
* Update README.md
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update integration.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Deployment Issues (#583)
* Update git.ts
* Tests
* Update git.ts
* Formatting
* Update src/git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* TestFlag
* Logging
* Update git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* Codespace Support (#584)
* Add files via upload
* Update README.md
* Add files via upload
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* SSH Issues (#588)
* Unsets Persisted Credentials (#587)
* Persist
* Config Setup/Tests
* Assets
* Update git.ts
* Spacing
* Update integration.yml
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
2021-02-06 11:05:18 +08:00
/** Determines test scenarios the action is running in. */
isTest : TestFlag
2020-03-02 20:52:38 +08:00
/** The git config name. */
2020-03-05 21:19:45 +08:00
name? : string
2020-03-09 21:19:16 +08:00
/** The repository path, for example JamesIves/github-pages-deploy-action. */
2020-03-05 21:19:45 +08:00
repositoryName? : string
2020-03-02 21:37:55 +08:00
/** The fully qualified repositpory path, this gets auto generated if repositoryName is provided. */
2020-03-05 21:19:45 +08:00
repositoryPath? : string
2020-03-31 08:44:09 +08:00
/** Wipes the commit history from the deployment branch in favor of a single commit. */
singleCommit? : boolean | null
2020-06-26 20:18:23 +08:00
/** Determines if the action should run in silent mode or not. */
2020-06-27 02:10:06 +08:00
silent : boolean
[Release] Version 4 (#589)
* Stop checking out workspace (#515)
* Stop checking out base branch before deployment, drop option.
* Don't check out default branch, as we don't check out base branch, drop option.
* Don't stash/unstash as we don't update the workdir, drop preserve option.
* Don't init the workspace
* Only fetch the remote branch if it exists, only with depth 1.
* Rely on previous checkouts to have handled lfs files correctly, drop option.
* Update README, action.yml, integration tests
* Set up eslint for test files. (#517)
* Add DRY_RUN option, passing --dry-run to git push. (#526)
See #499 for the proposal.
* Simplifies Token Setup (#530)
* Token simplification
* Access Token / Github Token -> Token
* Oops
* Typos
* Update README.md
* Update README.md
* Update action.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Adjust codeql action to latest recommendations (#540)
Also, add the dev and release branches, and drop master.
* Add workflow to update build and node_modules on release branches (#541)
* Stores username/email in secrets
* Removing stale bot integration
* Test current code base as an integration test for PRs and pushes (#505)
* Add a build step to create lib and node_modules artifact
* Run integration test with built dist and current SHA as base
For pull requests, the github.sha is the sha of the merge to the
target branch, not the head of the PR. Special case that.
* Use v2 checkout, and DRY_RUN for the integration test.
I also made the branches more generic, as there are now more of them.
* Fix #536, don't push at all on dryRun
Also add tests for dryRun and singleCommit and generateBranch
code flows.
* Try to fix dryRun on new remote branches, refactor fetch
* Try to fix dryRun, only fetch if origin branch exists
* Refactor worktree setup to include branch generation and setup for singleCommit
This is a continuation of the no-checkout work, and sadly suggested pretty
intensive changes.
* Set up git config to fix tests, also make debugging easier
* Add matrix for existing and non-existing branch
* Add matrix for singleCommit and not
* Drop GITHUB_TOKEN, add DRY_RUN to action.yml
* When deploying existing branch, add a modifcation and deploy again
* Force branch checkout to work in redeployment scenarios
* Make singleCommit easier to see in job descriptions
* Review comments
* Add a test-only property to action to test code paths with remote branch.
* Introduce TestFlag enum to signal different test scenarios to unit tests
* Fix util.test.ts
* Update worktree.ts
* Fix a few nits in tests and automation. Don't try to wordcount ls-rem… (#546)
* Fix a few nits in tests and automation. Don't try to wordcount ls-remote.
Nits in tests are around undoing changes made to the environment,
and to not modify the checkout.
* Describe suite with empty SHA
* Lowercase Inputs (#547)
* Lowercases inputs
* Adjusts workflow tests and deployment_status
* Use multi-line string for clean-exclude patterns. (#553)
As this change is subtle, I'm taking the opportunity to change
the underscore for the hyphen, which makes it less likely that
users of this action will just pass in an old json array.
* Hyphenate inputs and outputs, add step output, fix #558 (#559)
* Hyphenate inputs and outputs, add step output, fix #558
I've also tried to make the clean docs a bit clearer, and consistent
about clean being on my default. Still not totally happy with the intro
of the docs there, though.
* Add testing of step outputs to build integration tests
* Security Docs
* Integration tests
* Revert "Integration tests"
This reverts commit 639ff537d5bf88b668efb3a56d361e2a03f008c9.
* Native SSH Key Support (#569)
* SSH Key Support :key:
* Update ssh.ts
* Update src/ssh.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* README fixes/etc
* Unit Tests & README
* ssh key
* Update README.md
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update integration.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Deployment Issues (#583)
* Update git.ts
* Tests
* Update git.ts
* Formatting
* Update src/git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* TestFlag
* Logging
* Update git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* Codespace Support (#584)
* Add files via upload
* Update README.md
* Add files via upload
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* SSH Issues (#588)
* Unsets Persisted Credentials (#587)
* Persist
* Config Setup/Tests
* Assets
* Update git.ts
* Spacing
* Update integration.yml
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
2021-02-06 11:05:18 +08:00
/** Defines an SSH private key that can be used during deployment. This can also be set to true to use SSH deployment endpoints if you've already configured the SSH client outside of this package. */
sshKey? : string | boolean | null
2020-03-02 20:52:38 +08:00
/** 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. */
2020-03-05 21:19:45 +08:00
targetFolder? : string
[Release] Version 4 (#589)
* Stop checking out workspace (#515)
* Stop checking out base branch before deployment, drop option.
* Don't check out default branch, as we don't check out base branch, drop option.
* Don't stash/unstash as we don't update the workdir, drop preserve option.
* Don't init the workspace
* Only fetch the remote branch if it exists, only with depth 1.
* Rely on previous checkouts to have handled lfs files correctly, drop option.
* Update README, action.yml, integration tests
* Set up eslint for test files. (#517)
* Add DRY_RUN option, passing --dry-run to git push. (#526)
See #499 for the proposal.
* Simplifies Token Setup (#530)
* Token simplification
* Access Token / Github Token -> Token
* Oops
* Typos
* Update README.md
* Update README.md
* Update action.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Adjust codeql action to latest recommendations (#540)
Also, add the dev and release branches, and drop master.
* Add workflow to update build and node_modules on release branches (#541)
* Stores username/email in secrets
* Removing stale bot integration
* Test current code base as an integration test for PRs and pushes (#505)
* Add a build step to create lib and node_modules artifact
* Run integration test with built dist and current SHA as base
For pull requests, the github.sha is the sha of the merge to the
target branch, not the head of the PR. Special case that.
* Use v2 checkout, and DRY_RUN for the integration test.
I also made the branches more generic, as there are now more of them.
* Fix #536, don't push at all on dryRun
Also add tests for dryRun and singleCommit and generateBranch
code flows.
* Try to fix dryRun on new remote branches, refactor fetch
* Try to fix dryRun, only fetch if origin branch exists
* Refactor worktree setup to include branch generation and setup for singleCommit
This is a continuation of the no-checkout work, and sadly suggested pretty
intensive changes.
* Set up git config to fix tests, also make debugging easier
* Add matrix for existing and non-existing branch
* Add matrix for singleCommit and not
* Drop GITHUB_TOKEN, add DRY_RUN to action.yml
* When deploying existing branch, add a modifcation and deploy again
* Force branch checkout to work in redeployment scenarios
* Make singleCommit easier to see in job descriptions
* Review comments
* Add a test-only property to action to test code paths with remote branch.
* Introduce TestFlag enum to signal different test scenarios to unit tests
* Fix util.test.ts
* Update worktree.ts
* Fix a few nits in tests and automation. Don't try to wordcount ls-rem… (#546)
* Fix a few nits in tests and automation. Don't try to wordcount ls-remote.
Nits in tests are around undoing changes made to the environment,
and to not modify the checkout.
* Describe suite with empty SHA
* Lowercase Inputs (#547)
* Lowercases inputs
* Adjusts workflow tests and deployment_status
* Use multi-line string for clean-exclude patterns. (#553)
As this change is subtle, I'm taking the opportunity to change
the underscore for the hyphen, which makes it less likely that
users of this action will just pass in an old json array.
* Hyphenate inputs and outputs, add step output, fix #558 (#559)
* Hyphenate inputs and outputs, add step output, fix #558
I've also tried to make the clean docs a bit clearer, and consistent
about clean being on my default. Still not totally happy with the intro
of the docs there, though.
* Add testing of step outputs to build integration tests
* Security Docs
* Integration tests
* Revert "Integration tests"
This reverts commit 639ff537d5bf88b668efb3a56d361e2a03f008c9.
* Native SSH Key Support (#569)
* SSH Key Support :key:
* Update ssh.ts
* Update src/ssh.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* README fixes/etc
* Unit Tests & README
* ssh key
* Update README.md
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update integration.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Deployment Issues (#583)
* Update git.ts
* Tests
* Update git.ts
* Formatting
* Update src/git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* TestFlag
* Logging
* Update git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* Codespace Support (#584)
* Add files via upload
* Update README.md
* Add files via upload
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* SSH Issues (#588)
* Unsets Persisted Credentials (#587)
* Persist
* Config Setup/Tests
* Assets
* Update git.ts
* Spacing
* Update integration.yml
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
2021-02-06 11:05:18 +08:00
/** Deployment token. */
token? : string | null
/** The token type, ie ssh/token, this gets automatically generated. */
2020-03-05 21:19:45 +08:00
tokenType? : string
2020-03-02 20:52:38 +08:00
/** The folder where your deployment project lives. */
2020-03-05 21:19:45 +08:00
workspace : string
2020-03-02 20:52:38 +08:00
}
2019-11-19 23:06:27 +08:00
2020-10-17 23:47:44 +08:00
/** The minimum required values to run the action as a node module. */
export interface NodeActionInterface {
/** The branch that the action should deploy to. */
branch : string
/** The folder to deploy. */
folder : string
/** The repository path, for example JamesIves/github-pages-deploy-action. */
repositoryName : string
[Release] Version 4 (#589)
* Stop checking out workspace (#515)
* Stop checking out base branch before deployment, drop option.
* Don't check out default branch, as we don't check out base branch, drop option.
* Don't stash/unstash as we don't update the workdir, drop preserve option.
* Don't init the workspace
* Only fetch the remote branch if it exists, only with depth 1.
* Rely on previous checkouts to have handled lfs files correctly, drop option.
* Update README, action.yml, integration tests
* Set up eslint for test files. (#517)
* Add DRY_RUN option, passing --dry-run to git push. (#526)
See #499 for the proposal.
* Simplifies Token Setup (#530)
* Token simplification
* Access Token / Github Token -> Token
* Oops
* Typos
* Update README.md
* Update README.md
* Update action.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Adjust codeql action to latest recommendations (#540)
Also, add the dev and release branches, and drop master.
* Add workflow to update build and node_modules on release branches (#541)
* Stores username/email in secrets
* Removing stale bot integration
* Test current code base as an integration test for PRs and pushes (#505)
* Add a build step to create lib and node_modules artifact
* Run integration test with built dist and current SHA as base
For pull requests, the github.sha is the sha of the merge to the
target branch, not the head of the PR. Special case that.
* Use v2 checkout, and DRY_RUN for the integration test.
I also made the branches more generic, as there are now more of them.
* Fix #536, don't push at all on dryRun
Also add tests for dryRun and singleCommit and generateBranch
code flows.
* Try to fix dryRun on new remote branches, refactor fetch
* Try to fix dryRun, only fetch if origin branch exists
* Refactor worktree setup to include branch generation and setup for singleCommit
This is a continuation of the no-checkout work, and sadly suggested pretty
intensive changes.
* Set up git config to fix tests, also make debugging easier
* Add matrix for existing and non-existing branch
* Add matrix for singleCommit and not
* Drop GITHUB_TOKEN, add DRY_RUN to action.yml
* When deploying existing branch, add a modifcation and deploy again
* Force branch checkout to work in redeployment scenarios
* Make singleCommit easier to see in job descriptions
* Review comments
* Add a test-only property to action to test code paths with remote branch.
* Introduce TestFlag enum to signal different test scenarios to unit tests
* Fix util.test.ts
* Update worktree.ts
* Fix a few nits in tests and automation. Don't try to wordcount ls-rem… (#546)
* Fix a few nits in tests and automation. Don't try to wordcount ls-remote.
Nits in tests are around undoing changes made to the environment,
and to not modify the checkout.
* Describe suite with empty SHA
* Lowercase Inputs (#547)
* Lowercases inputs
* Adjusts workflow tests and deployment_status
* Use multi-line string for clean-exclude patterns. (#553)
As this change is subtle, I'm taking the opportunity to change
the underscore for the hyphen, which makes it less likely that
users of this action will just pass in an old json array.
* Hyphenate inputs and outputs, add step output, fix #558 (#559)
* Hyphenate inputs and outputs, add step output, fix #558
I've also tried to make the clean docs a bit clearer, and consistent
about clean being on my default. Still not totally happy with the intro
of the docs there, though.
* Add testing of step outputs to build integration tests
* Security Docs
* Integration tests
* Revert "Integration tests"
This reverts commit 639ff537d5bf88b668efb3a56d361e2a03f008c9.
* Native SSH Key Support (#569)
* SSH Key Support :key:
* Update ssh.ts
* Update src/ssh.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* README fixes/etc
* Unit Tests & README
* ssh key
* Update README.md
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update integration.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Deployment Issues (#583)
* Update git.ts
* Tests
* Update git.ts
* Formatting
* Update src/git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* TestFlag
* Logging
* Update git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* Codespace Support (#584)
* Add files via upload
* Update README.md
* Add files via upload
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* SSH Issues (#588)
* Unsets Persisted Credentials (#587)
* Persist
* Config Setup/Tests
* Assets
* Update git.ts
* Spacing
* Update integration.yml
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
2021-02-06 11:05:18 +08:00
/** GitHub deployment token. */
token? : string | null
2020-10-17 23:47:44 +08:00
/** Determines if the action should run in silent mode or not. */
silent : boolean
[Release] Version 4 (#589)
* Stop checking out workspace (#515)
* Stop checking out base branch before deployment, drop option.
* Don't check out default branch, as we don't check out base branch, drop option.
* Don't stash/unstash as we don't update the workdir, drop preserve option.
* Don't init the workspace
* Only fetch the remote branch if it exists, only with depth 1.
* Rely on previous checkouts to have handled lfs files correctly, drop option.
* Update README, action.yml, integration tests
* Set up eslint for test files. (#517)
* Add DRY_RUN option, passing --dry-run to git push. (#526)
See #499 for the proposal.
* Simplifies Token Setup (#530)
* Token simplification
* Access Token / Github Token -> Token
* Oops
* Typos
* Update README.md
* Update README.md
* Update action.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Adjust codeql action to latest recommendations (#540)
Also, add the dev and release branches, and drop master.
* Add workflow to update build and node_modules on release branches (#541)
* Stores username/email in secrets
* Removing stale bot integration
* Test current code base as an integration test for PRs and pushes (#505)
* Add a build step to create lib and node_modules artifact
* Run integration test with built dist and current SHA as base
For pull requests, the github.sha is the sha of the merge to the
target branch, not the head of the PR. Special case that.
* Use v2 checkout, and DRY_RUN for the integration test.
I also made the branches more generic, as there are now more of them.
* Fix #536, don't push at all on dryRun
Also add tests for dryRun and singleCommit and generateBranch
code flows.
* Try to fix dryRun on new remote branches, refactor fetch
* Try to fix dryRun, only fetch if origin branch exists
* Refactor worktree setup to include branch generation and setup for singleCommit
This is a continuation of the no-checkout work, and sadly suggested pretty
intensive changes.
* Set up git config to fix tests, also make debugging easier
* Add matrix for existing and non-existing branch
* Add matrix for singleCommit and not
* Drop GITHUB_TOKEN, add DRY_RUN to action.yml
* When deploying existing branch, add a modifcation and deploy again
* Force branch checkout to work in redeployment scenarios
* Make singleCommit easier to see in job descriptions
* Review comments
* Add a test-only property to action to test code paths with remote branch.
* Introduce TestFlag enum to signal different test scenarios to unit tests
* Fix util.test.ts
* Update worktree.ts
* Fix a few nits in tests and automation. Don't try to wordcount ls-rem… (#546)
* Fix a few nits in tests and automation. Don't try to wordcount ls-remote.
Nits in tests are around undoing changes made to the environment,
and to not modify the checkout.
* Describe suite with empty SHA
* Lowercase Inputs (#547)
* Lowercases inputs
* Adjusts workflow tests and deployment_status
* Use multi-line string for clean-exclude patterns. (#553)
As this change is subtle, I'm taking the opportunity to change
the underscore for the hyphen, which makes it less likely that
users of this action will just pass in an old json array.
* Hyphenate inputs and outputs, add step output, fix #558 (#559)
* Hyphenate inputs and outputs, add step output, fix #558
I've also tried to make the clean docs a bit clearer, and consistent
about clean being on my default. Still not totally happy with the intro
of the docs there, though.
* Add testing of step outputs to build integration tests
* Security Docs
* Integration tests
* Revert "Integration tests"
This reverts commit 639ff537d5bf88b668efb3a56d361e2a03f008c9.
* Native SSH Key Support (#569)
* SSH Key Support :key:
* Update ssh.ts
* Update src/ssh.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* README fixes/etc
* Unit Tests & README
* ssh key
* Update README.md
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update integration.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Deployment Issues (#583)
* Update git.ts
* Tests
* Update git.ts
* Formatting
* Update src/git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* TestFlag
* Logging
* Update git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* Codespace Support (#584)
* Add files via upload
* Update README.md
* Add files via upload
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* SSH Issues (#588)
* Unsets Persisted Credentials (#587)
* Persist
* Config Setup/Tests
* Assets
* Update git.ts
* Spacing
* Update integration.yml
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
2021-02-06 11:05:18 +08:00
/** Defines an SSH private key that can be used during deployment. This can also be set to true to use SSH deployment endpoints if you've already configured the SSH client outside of this package. */
sshKey? : string | boolean | null
2020-10-17 23:47:44 +08:00
/** The folder where your deployment project lives. */
workspace : string
[Release] Version 4 (#589)
* Stop checking out workspace (#515)
* Stop checking out base branch before deployment, drop option.
* Don't check out default branch, as we don't check out base branch, drop option.
* Don't stash/unstash as we don't update the workdir, drop preserve option.
* Don't init the workspace
* Only fetch the remote branch if it exists, only with depth 1.
* Rely on previous checkouts to have handled lfs files correctly, drop option.
* Update README, action.yml, integration tests
* Set up eslint for test files. (#517)
* Add DRY_RUN option, passing --dry-run to git push. (#526)
See #499 for the proposal.
* Simplifies Token Setup (#530)
* Token simplification
* Access Token / Github Token -> Token
* Oops
* Typos
* Update README.md
* Update README.md
* Update action.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Adjust codeql action to latest recommendations (#540)
Also, add the dev and release branches, and drop master.
* Add workflow to update build and node_modules on release branches (#541)
* Stores username/email in secrets
* Removing stale bot integration
* Test current code base as an integration test for PRs and pushes (#505)
* Add a build step to create lib and node_modules artifact
* Run integration test with built dist and current SHA as base
For pull requests, the github.sha is the sha of the merge to the
target branch, not the head of the PR. Special case that.
* Use v2 checkout, and DRY_RUN for the integration test.
I also made the branches more generic, as there are now more of them.
* Fix #536, don't push at all on dryRun
Also add tests for dryRun and singleCommit and generateBranch
code flows.
* Try to fix dryRun on new remote branches, refactor fetch
* Try to fix dryRun, only fetch if origin branch exists
* Refactor worktree setup to include branch generation and setup for singleCommit
This is a continuation of the no-checkout work, and sadly suggested pretty
intensive changes.
* Set up git config to fix tests, also make debugging easier
* Add matrix for existing and non-existing branch
* Add matrix for singleCommit and not
* Drop GITHUB_TOKEN, add DRY_RUN to action.yml
* When deploying existing branch, add a modifcation and deploy again
* Force branch checkout to work in redeployment scenarios
* Make singleCommit easier to see in job descriptions
* Review comments
* Add a test-only property to action to test code paths with remote branch.
* Introduce TestFlag enum to signal different test scenarios to unit tests
* Fix util.test.ts
* Update worktree.ts
* Fix a few nits in tests and automation. Don't try to wordcount ls-rem… (#546)
* Fix a few nits in tests and automation. Don't try to wordcount ls-remote.
Nits in tests are around undoing changes made to the environment,
and to not modify the checkout.
* Describe suite with empty SHA
* Lowercase Inputs (#547)
* Lowercases inputs
* Adjusts workflow tests and deployment_status
* Use multi-line string for clean-exclude patterns. (#553)
As this change is subtle, I'm taking the opportunity to change
the underscore for the hyphen, which makes it less likely that
users of this action will just pass in an old json array.
* Hyphenate inputs and outputs, add step output, fix #558 (#559)
* Hyphenate inputs and outputs, add step output, fix #558
I've also tried to make the clean docs a bit clearer, and consistent
about clean being on my default. Still not totally happy with the intro
of the docs there, though.
* Add testing of step outputs to build integration tests
* Security Docs
* Integration tests
* Revert "Integration tests"
This reverts commit 639ff537d5bf88b668efb3a56d361e2a03f008c9.
* Native SSH Key Support (#569)
* SSH Key Support :key:
* Update ssh.ts
* Update src/ssh.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* README fixes/etc
* Unit Tests & README
* ssh key
* Update README.md
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update integration.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Deployment Issues (#583)
* Update git.ts
* Tests
* Update git.ts
* Formatting
* Update src/git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* TestFlag
* Logging
* Update git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* Codespace Support (#584)
* Add files via upload
* Update README.md
* Add files via upload
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* SSH Issues (#588)
* Unsets Persisted Credentials (#587)
* Persist
* Config Setup/Tests
* Assets
* Update git.ts
* Spacing
* Update integration.yml
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
2021-02-06 11:05:18 +08:00
/** Determines test scenarios the action is running in. */
isTest : TestFlag
2020-10-17 23:47:44 +08:00
}
2020-03-02 20:52:38 +08:00
/* Required action data that gets initialized when running within the GitHub Actions environment. */
2020-03-07 11:36:56 +08:00
export const action : ActionInterface = {
[Release] Version 4 (#589)
* Stop checking out workspace (#515)
* Stop checking out base branch before deployment, drop option.
* Don't check out default branch, as we don't check out base branch, drop option.
* Don't stash/unstash as we don't update the workdir, drop preserve option.
* Don't init the workspace
* Only fetch the remote branch if it exists, only with depth 1.
* Rely on previous checkouts to have handled lfs files correctly, drop option.
* Update README, action.yml, integration tests
* Set up eslint for test files. (#517)
* Add DRY_RUN option, passing --dry-run to git push. (#526)
See #499 for the proposal.
* Simplifies Token Setup (#530)
* Token simplification
* Access Token / Github Token -> Token
* Oops
* Typos
* Update README.md
* Update README.md
* Update action.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Adjust codeql action to latest recommendations (#540)
Also, add the dev and release branches, and drop master.
* Add workflow to update build and node_modules on release branches (#541)
* Stores username/email in secrets
* Removing stale bot integration
* Test current code base as an integration test for PRs and pushes (#505)
* Add a build step to create lib and node_modules artifact
* Run integration test with built dist and current SHA as base
For pull requests, the github.sha is the sha of the merge to the
target branch, not the head of the PR. Special case that.
* Use v2 checkout, and DRY_RUN for the integration test.
I also made the branches more generic, as there are now more of them.
* Fix #536, don't push at all on dryRun
Also add tests for dryRun and singleCommit and generateBranch
code flows.
* Try to fix dryRun on new remote branches, refactor fetch
* Try to fix dryRun, only fetch if origin branch exists
* Refactor worktree setup to include branch generation and setup for singleCommit
This is a continuation of the no-checkout work, and sadly suggested pretty
intensive changes.
* Set up git config to fix tests, also make debugging easier
* Add matrix for existing and non-existing branch
* Add matrix for singleCommit and not
* Drop GITHUB_TOKEN, add DRY_RUN to action.yml
* When deploying existing branch, add a modifcation and deploy again
* Force branch checkout to work in redeployment scenarios
* Make singleCommit easier to see in job descriptions
* Review comments
* Add a test-only property to action to test code paths with remote branch.
* Introduce TestFlag enum to signal different test scenarios to unit tests
* Fix util.test.ts
* Update worktree.ts
* Fix a few nits in tests and automation. Don't try to wordcount ls-rem… (#546)
* Fix a few nits in tests and automation. Don't try to wordcount ls-remote.
Nits in tests are around undoing changes made to the environment,
and to not modify the checkout.
* Describe suite with empty SHA
* Lowercase Inputs (#547)
* Lowercases inputs
* Adjusts workflow tests and deployment_status
* Use multi-line string for clean-exclude patterns. (#553)
As this change is subtle, I'm taking the opportunity to change
the underscore for the hyphen, which makes it less likely that
users of this action will just pass in an old json array.
* Hyphenate inputs and outputs, add step output, fix #558 (#559)
* Hyphenate inputs and outputs, add step output, fix #558
I've also tried to make the clean docs a bit clearer, and consistent
about clean being on my default. Still not totally happy with the intro
of the docs there, though.
* Add testing of step outputs to build integration tests
* Security Docs
* Integration tests
* Revert "Integration tests"
This reverts commit 639ff537d5bf88b668efb3a56d361e2a03f008c9.
* Native SSH Key Support (#569)
* SSH Key Support :key:
* Update ssh.ts
* Update src/ssh.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* README fixes/etc
* Unit Tests & README
* ssh key
* Update README.md
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update integration.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Deployment Issues (#583)
* Update git.ts
* Tests
* Update git.ts
* Formatting
* Update src/git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* TestFlag
* Logging
* Update git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* Codespace Support (#584)
* Add files via upload
* Update README.md
* Add files via upload
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* SSH Issues (#588)
* Unsets Persisted Credentials (#587)
* Persist
* Config Setup/Tests
* Assets
* Update git.ts
* Spacing
* Update integration.yml
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
2021-02-06 11:05:18 +08:00
folder : getInput ( 'folder' ) ,
branch : getInput ( 'branch' ) ,
commitMessage : getInput ( 'commit-message' ) ,
dryRun : ! isNullOrUndefined ( getInput ( 'dry-run' ) )
? getInput ( 'dry-run' ) . toLowerCase ( ) === 'true'
2020-03-29 01:04:59 +08:00
: false ,
[Release] Version 4 (#589)
* Stop checking out workspace (#515)
* Stop checking out base branch before deployment, drop option.
* Don't check out default branch, as we don't check out base branch, drop option.
* Don't stash/unstash as we don't update the workdir, drop preserve option.
* Don't init the workspace
* Only fetch the remote branch if it exists, only with depth 1.
* Rely on previous checkouts to have handled lfs files correctly, drop option.
* Update README, action.yml, integration tests
* Set up eslint for test files. (#517)
* Add DRY_RUN option, passing --dry-run to git push. (#526)
See #499 for the proposal.
* Simplifies Token Setup (#530)
* Token simplification
* Access Token / Github Token -> Token
* Oops
* Typos
* Update README.md
* Update README.md
* Update action.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Adjust codeql action to latest recommendations (#540)
Also, add the dev and release branches, and drop master.
* Add workflow to update build and node_modules on release branches (#541)
* Stores username/email in secrets
* Removing stale bot integration
* Test current code base as an integration test for PRs and pushes (#505)
* Add a build step to create lib and node_modules artifact
* Run integration test with built dist and current SHA as base
For pull requests, the github.sha is the sha of the merge to the
target branch, not the head of the PR. Special case that.
* Use v2 checkout, and DRY_RUN for the integration test.
I also made the branches more generic, as there are now more of them.
* Fix #536, don't push at all on dryRun
Also add tests for dryRun and singleCommit and generateBranch
code flows.
* Try to fix dryRun on new remote branches, refactor fetch
* Try to fix dryRun, only fetch if origin branch exists
* Refactor worktree setup to include branch generation and setup for singleCommit
This is a continuation of the no-checkout work, and sadly suggested pretty
intensive changes.
* Set up git config to fix tests, also make debugging easier
* Add matrix for existing and non-existing branch
* Add matrix for singleCommit and not
* Drop GITHUB_TOKEN, add DRY_RUN to action.yml
* When deploying existing branch, add a modifcation and deploy again
* Force branch checkout to work in redeployment scenarios
* Make singleCommit easier to see in job descriptions
* Review comments
* Add a test-only property to action to test code paths with remote branch.
* Introduce TestFlag enum to signal different test scenarios to unit tests
* Fix util.test.ts
* Update worktree.ts
* Fix a few nits in tests and automation. Don't try to wordcount ls-rem… (#546)
* Fix a few nits in tests and automation. Don't try to wordcount ls-remote.
Nits in tests are around undoing changes made to the environment,
and to not modify the checkout.
* Describe suite with empty SHA
* Lowercase Inputs (#547)
* Lowercases inputs
* Adjusts workflow tests and deployment_status
* Use multi-line string for clean-exclude patterns. (#553)
As this change is subtle, I'm taking the opportunity to change
the underscore for the hyphen, which makes it less likely that
users of this action will just pass in an old json array.
* Hyphenate inputs and outputs, add step output, fix #558 (#559)
* Hyphenate inputs and outputs, add step output, fix #558
I've also tried to make the clean docs a bit clearer, and consistent
about clean being on my default. Still not totally happy with the intro
of the docs there, though.
* Add testing of step outputs to build integration tests
* Security Docs
* Integration tests
* Revert "Integration tests"
This reverts commit 639ff537d5bf88b668efb3a56d361e2a03f008c9.
* Native SSH Key Support (#569)
* SSH Key Support :key:
* Update ssh.ts
* Update src/ssh.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* README fixes/etc
* Unit Tests & README
* ssh key
* Update README.md
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update integration.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Deployment Issues (#583)
* Update git.ts
* Tests
* Update git.ts
* Formatting
* Update src/git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* TestFlag
* Logging
* Update git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* Codespace Support (#584)
* Add files via upload
* Update README.md
* Add files via upload
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* SSH Issues (#588)
* Unsets Persisted Credentials (#587)
* Persist
* Config Setup/Tests
* Assets
* Update git.ts
* Spacing
* Update integration.yml
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
2021-02-06 11:05:18 +08:00
clean : ! isNullOrUndefined ( getInput ( 'clean' ) )
? getInput ( 'clean' ) . toLowerCase ( ) === 'true'
2020-09-13 05:33:19 +08:00
: false ,
[Release] Version 4 (#589)
* Stop checking out workspace (#515)
* Stop checking out base branch before deployment, drop option.
* Don't check out default branch, as we don't check out base branch, drop option.
* Don't stash/unstash as we don't update the workdir, drop preserve option.
* Don't init the workspace
* Only fetch the remote branch if it exists, only with depth 1.
* Rely on previous checkouts to have handled lfs files correctly, drop option.
* Update README, action.yml, integration tests
* Set up eslint for test files. (#517)
* Add DRY_RUN option, passing --dry-run to git push. (#526)
See #499 for the proposal.
* Simplifies Token Setup (#530)
* Token simplification
* Access Token / Github Token -> Token
* Oops
* Typos
* Update README.md
* Update README.md
* Update action.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Adjust codeql action to latest recommendations (#540)
Also, add the dev and release branches, and drop master.
* Add workflow to update build and node_modules on release branches (#541)
* Stores username/email in secrets
* Removing stale bot integration
* Test current code base as an integration test for PRs and pushes (#505)
* Add a build step to create lib and node_modules artifact
* Run integration test with built dist and current SHA as base
For pull requests, the github.sha is the sha of the merge to the
target branch, not the head of the PR. Special case that.
* Use v2 checkout, and DRY_RUN for the integration test.
I also made the branches more generic, as there are now more of them.
* Fix #536, don't push at all on dryRun
Also add tests for dryRun and singleCommit and generateBranch
code flows.
* Try to fix dryRun on new remote branches, refactor fetch
* Try to fix dryRun, only fetch if origin branch exists
* Refactor worktree setup to include branch generation and setup for singleCommit
This is a continuation of the no-checkout work, and sadly suggested pretty
intensive changes.
* Set up git config to fix tests, also make debugging easier
* Add matrix for existing and non-existing branch
* Add matrix for singleCommit and not
* Drop GITHUB_TOKEN, add DRY_RUN to action.yml
* When deploying existing branch, add a modifcation and deploy again
* Force branch checkout to work in redeployment scenarios
* Make singleCommit easier to see in job descriptions
* Review comments
* Add a test-only property to action to test code paths with remote branch.
* Introduce TestFlag enum to signal different test scenarios to unit tests
* Fix util.test.ts
* Update worktree.ts
* Fix a few nits in tests and automation. Don't try to wordcount ls-rem… (#546)
* Fix a few nits in tests and automation. Don't try to wordcount ls-remote.
Nits in tests are around undoing changes made to the environment,
and to not modify the checkout.
* Describe suite with empty SHA
* Lowercase Inputs (#547)
* Lowercases inputs
* Adjusts workflow tests and deployment_status
* Use multi-line string for clean-exclude patterns. (#553)
As this change is subtle, I'm taking the opportunity to change
the underscore for the hyphen, which makes it less likely that
users of this action will just pass in an old json array.
* Hyphenate inputs and outputs, add step output, fix #558 (#559)
* Hyphenate inputs and outputs, add step output, fix #558
I've also tried to make the clean docs a bit clearer, and consistent
about clean being on my default. Still not totally happy with the intro
of the docs there, though.
* Add testing of step outputs to build integration tests
* Security Docs
* Integration tests
* Revert "Integration tests"
This reverts commit 639ff537d5bf88b668efb3a56d361e2a03f008c9.
* Native SSH Key Support (#569)
* SSH Key Support :key:
* Update ssh.ts
* Update src/ssh.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* README fixes/etc
* Unit Tests & README
* ssh key
* Update README.md
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update integration.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Deployment Issues (#583)
* Update git.ts
* Tests
* Update git.ts
* Formatting
* Update src/git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* TestFlag
* Logging
* Update git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* Codespace Support (#584)
* Add files via upload
* Update README.md
* Add files via upload
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* SSH Issues (#588)
* Unsets Persisted Credentials (#587)
* Persist
* Config Setup/Tests
* Assets
* Update git.ts
* Spacing
* Update integration.yml
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
2021-02-06 11:05:18 +08:00
cleanExclude : ( getInput ( 'clean-exclude' ) || '' )
. split ( '\n' )
. filter ( l = > l !== '' ) ,
2021-03-04 21:47:44 +08:00
hostname : process.env.GITHUB_SERVER_URL
? stripProtocolFromUrl ( process . env . GITHUB_SERVER_URL )
: 'github.com' ,
[Release] Version 4 (#589)
* Stop checking out workspace (#515)
* Stop checking out base branch before deployment, drop option.
* Don't check out default branch, as we don't check out base branch, drop option.
* Don't stash/unstash as we don't update the workdir, drop preserve option.
* Don't init the workspace
* Only fetch the remote branch if it exists, only with depth 1.
* Rely on previous checkouts to have handled lfs files correctly, drop option.
* Update README, action.yml, integration tests
* Set up eslint for test files. (#517)
* Add DRY_RUN option, passing --dry-run to git push. (#526)
See #499 for the proposal.
* Simplifies Token Setup (#530)
* Token simplification
* Access Token / Github Token -> Token
* Oops
* Typos
* Update README.md
* Update README.md
* Update action.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Adjust codeql action to latest recommendations (#540)
Also, add the dev and release branches, and drop master.
* Add workflow to update build and node_modules on release branches (#541)
* Stores username/email in secrets
* Removing stale bot integration
* Test current code base as an integration test for PRs and pushes (#505)
* Add a build step to create lib and node_modules artifact
* Run integration test with built dist and current SHA as base
For pull requests, the github.sha is the sha of the merge to the
target branch, not the head of the PR. Special case that.
* Use v2 checkout, and DRY_RUN for the integration test.
I also made the branches more generic, as there are now more of them.
* Fix #536, don't push at all on dryRun
Also add tests for dryRun and singleCommit and generateBranch
code flows.
* Try to fix dryRun on new remote branches, refactor fetch
* Try to fix dryRun, only fetch if origin branch exists
* Refactor worktree setup to include branch generation and setup for singleCommit
This is a continuation of the no-checkout work, and sadly suggested pretty
intensive changes.
* Set up git config to fix tests, also make debugging easier
* Add matrix for existing and non-existing branch
* Add matrix for singleCommit and not
* Drop GITHUB_TOKEN, add DRY_RUN to action.yml
* When deploying existing branch, add a modifcation and deploy again
* Force branch checkout to work in redeployment scenarios
* Make singleCommit easier to see in job descriptions
* Review comments
* Add a test-only property to action to test code paths with remote branch.
* Introduce TestFlag enum to signal different test scenarios to unit tests
* Fix util.test.ts
* Update worktree.ts
* Fix a few nits in tests and automation. Don't try to wordcount ls-rem… (#546)
* Fix a few nits in tests and automation. Don't try to wordcount ls-remote.
Nits in tests are around undoing changes made to the environment,
and to not modify the checkout.
* Describe suite with empty SHA
* Lowercase Inputs (#547)
* Lowercases inputs
* Adjusts workflow tests and deployment_status
* Use multi-line string for clean-exclude patterns. (#553)
As this change is subtle, I'm taking the opportunity to change
the underscore for the hyphen, which makes it less likely that
users of this action will just pass in an old json array.
* Hyphenate inputs and outputs, add step output, fix #558 (#559)
* Hyphenate inputs and outputs, add step output, fix #558
I've also tried to make the clean docs a bit clearer, and consistent
about clean being on my default. Still not totally happy with the intro
of the docs there, though.
* Add testing of step outputs to build integration tests
* Security Docs
* Integration tests
* Revert "Integration tests"
This reverts commit 639ff537d5bf88b668efb3a56d361e2a03f008c9.
* Native SSH Key Support (#569)
* SSH Key Support :key:
* Update ssh.ts
* Update src/ssh.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* README fixes/etc
* Unit Tests & README
* ssh key
* Update README.md
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update integration.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Deployment Issues (#583)
* Update git.ts
* Tests
* Update git.ts
* Formatting
* Update src/git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* TestFlag
* Logging
* Update git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* Codespace Support (#584)
* Add files via upload
* Update README.md
* Add files via upload
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* SSH Issues (#588)
* Unsets Persisted Credentials (#587)
* Persist
* Config Setup/Tests
* Assets
* Update git.ts
* Spacing
* Update integration.yml
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
2021-02-06 11:05:18 +08:00
isTest : TestFlag.NONE ,
2021-11-26 20:46:44 +08:00
email : ! isNullOrUndefined ( getInput ( 'git-config-email' ) )
[Release] Version 4 (#589)
* Stop checking out workspace (#515)
* Stop checking out base branch before deployment, drop option.
* Don't check out default branch, as we don't check out base branch, drop option.
* Don't stash/unstash as we don't update the workdir, drop preserve option.
* Don't init the workspace
* Only fetch the remote branch if it exists, only with depth 1.
* Rely on previous checkouts to have handled lfs files correctly, drop option.
* Update README, action.yml, integration tests
* Set up eslint for test files. (#517)
* Add DRY_RUN option, passing --dry-run to git push. (#526)
See #499 for the proposal.
* Simplifies Token Setup (#530)
* Token simplification
* Access Token / Github Token -> Token
* Oops
* Typos
* Update README.md
* Update README.md
* Update action.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Adjust codeql action to latest recommendations (#540)
Also, add the dev and release branches, and drop master.
* Add workflow to update build and node_modules on release branches (#541)
* Stores username/email in secrets
* Removing stale bot integration
* Test current code base as an integration test for PRs and pushes (#505)
* Add a build step to create lib and node_modules artifact
* Run integration test with built dist and current SHA as base
For pull requests, the github.sha is the sha of the merge to the
target branch, not the head of the PR. Special case that.
* Use v2 checkout, and DRY_RUN for the integration test.
I also made the branches more generic, as there are now more of them.
* Fix #536, don't push at all on dryRun
Also add tests for dryRun and singleCommit and generateBranch
code flows.
* Try to fix dryRun on new remote branches, refactor fetch
* Try to fix dryRun, only fetch if origin branch exists
* Refactor worktree setup to include branch generation and setup for singleCommit
This is a continuation of the no-checkout work, and sadly suggested pretty
intensive changes.
* Set up git config to fix tests, also make debugging easier
* Add matrix for existing and non-existing branch
* Add matrix for singleCommit and not
* Drop GITHUB_TOKEN, add DRY_RUN to action.yml
* When deploying existing branch, add a modifcation and deploy again
* Force branch checkout to work in redeployment scenarios
* Make singleCommit easier to see in job descriptions
* Review comments
* Add a test-only property to action to test code paths with remote branch.
* Introduce TestFlag enum to signal different test scenarios to unit tests
* Fix util.test.ts
* Update worktree.ts
* Fix a few nits in tests and automation. Don't try to wordcount ls-rem… (#546)
* Fix a few nits in tests and automation. Don't try to wordcount ls-remote.
Nits in tests are around undoing changes made to the environment,
and to not modify the checkout.
* Describe suite with empty SHA
* Lowercase Inputs (#547)
* Lowercases inputs
* Adjusts workflow tests and deployment_status
* Use multi-line string for clean-exclude patterns. (#553)
As this change is subtle, I'm taking the opportunity to change
the underscore for the hyphen, which makes it less likely that
users of this action will just pass in an old json array.
* Hyphenate inputs and outputs, add step output, fix #558 (#559)
* Hyphenate inputs and outputs, add step output, fix #558
I've also tried to make the clean docs a bit clearer, and consistent
about clean being on my default. Still not totally happy with the intro
of the docs there, though.
* Add testing of step outputs to build integration tests
* Security Docs
* Integration tests
* Revert "Integration tests"
This reverts commit 639ff537d5bf88b668efb3a56d361e2a03f008c9.
* Native SSH Key Support (#569)
* SSH Key Support :key:
* Update ssh.ts
* Update src/ssh.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* README fixes/etc
* Unit Tests & README
* ssh key
* Update README.md
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update integration.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Deployment Issues (#583)
* Update git.ts
* Tests
* Update git.ts
* Formatting
* Update src/git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* TestFlag
* Logging
* Update git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* Codespace Support (#584)
* Add files via upload
* Update README.md
* Add files via upload
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* SSH Issues (#588)
* Unsets Persisted Credentials (#587)
* Persist
* Config Setup/Tests
* Assets
* Update git.ts
* Spacing
* Update integration.yml
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
2021-02-06 11:05:18 +08:00
? getInput ( 'git-config-email' )
2020-01-28 12:55:28 +08:00
: pusher && pusher . email
? pusher . email
2020-09-13 06:11:16 +08:00
: ` ${
process . env . GITHUB_ACTOR || 'github-pages-deploy-action'
2021-03-04 21:47:44 +08:00
} @users . noreply . $ {
process . env . GITHUB_SERVER_URL
? stripProtocolFromUrl ( process . env . GITHUB_SERVER_URL )
: 'github.com'
} ` ,
[Release] Version 4 (#589)
* Stop checking out workspace (#515)
* Stop checking out base branch before deployment, drop option.
* Don't check out default branch, as we don't check out base branch, drop option.
* Don't stash/unstash as we don't update the workdir, drop preserve option.
* Don't init the workspace
* Only fetch the remote branch if it exists, only with depth 1.
* Rely on previous checkouts to have handled lfs files correctly, drop option.
* Update README, action.yml, integration tests
* Set up eslint for test files. (#517)
* Add DRY_RUN option, passing --dry-run to git push. (#526)
See #499 for the proposal.
* Simplifies Token Setup (#530)
* Token simplification
* Access Token / Github Token -> Token
* Oops
* Typos
* Update README.md
* Update README.md
* Update action.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Adjust codeql action to latest recommendations (#540)
Also, add the dev and release branches, and drop master.
* Add workflow to update build and node_modules on release branches (#541)
* Stores username/email in secrets
* Removing stale bot integration
* Test current code base as an integration test for PRs and pushes (#505)
* Add a build step to create lib and node_modules artifact
* Run integration test with built dist and current SHA as base
For pull requests, the github.sha is the sha of the merge to the
target branch, not the head of the PR. Special case that.
* Use v2 checkout, and DRY_RUN for the integration test.
I also made the branches more generic, as there are now more of them.
* Fix #536, don't push at all on dryRun
Also add tests for dryRun and singleCommit and generateBranch
code flows.
* Try to fix dryRun on new remote branches, refactor fetch
* Try to fix dryRun, only fetch if origin branch exists
* Refactor worktree setup to include branch generation and setup for singleCommit
This is a continuation of the no-checkout work, and sadly suggested pretty
intensive changes.
* Set up git config to fix tests, also make debugging easier
* Add matrix for existing and non-existing branch
* Add matrix for singleCommit and not
* Drop GITHUB_TOKEN, add DRY_RUN to action.yml
* When deploying existing branch, add a modifcation and deploy again
* Force branch checkout to work in redeployment scenarios
* Make singleCommit easier to see in job descriptions
* Review comments
* Add a test-only property to action to test code paths with remote branch.
* Introduce TestFlag enum to signal different test scenarios to unit tests
* Fix util.test.ts
* Update worktree.ts
* Fix a few nits in tests and automation. Don't try to wordcount ls-rem… (#546)
* Fix a few nits in tests and automation. Don't try to wordcount ls-remote.
Nits in tests are around undoing changes made to the environment,
and to not modify the checkout.
* Describe suite with empty SHA
* Lowercase Inputs (#547)
* Lowercases inputs
* Adjusts workflow tests and deployment_status
* Use multi-line string for clean-exclude patterns. (#553)
As this change is subtle, I'm taking the opportunity to change
the underscore for the hyphen, which makes it less likely that
users of this action will just pass in an old json array.
* Hyphenate inputs and outputs, add step output, fix #558 (#559)
* Hyphenate inputs and outputs, add step output, fix #558
I've also tried to make the clean docs a bit clearer, and consistent
about clean being on my default. Still not totally happy with the intro
of the docs there, though.
* Add testing of step outputs to build integration tests
* Security Docs
* Integration tests
* Revert "Integration tests"
This reverts commit 639ff537d5bf88b668efb3a56d361e2a03f008c9.
* Native SSH Key Support (#569)
* SSH Key Support :key:
* Update ssh.ts
* Update src/ssh.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* README fixes/etc
* Unit Tests & README
* ssh key
* Update README.md
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update integration.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Deployment Issues (#583)
* Update git.ts
* Tests
* Update git.ts
* Formatting
* Update src/git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* TestFlag
* Logging
* Update git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* Codespace Support (#584)
* Add files via upload
* Update README.md
* Add files via upload
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* SSH Issues (#588)
* Unsets Persisted Credentials (#587)
* Persist
* Config Setup/Tests
* Assets
* Update git.ts
* Spacing
* Update integration.yml
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
2021-02-06 11:05:18 +08:00
name : ! isNullOrUndefined ( getInput ( 'git-config-name' ) )
? getInput ( 'git-config-name' )
2020-01-28 12:55:28 +08:00
: pusher && pusher . name
? pusher . name
: process . env . GITHUB_ACTOR
? process . env . GITHUB_ACTOR
2020-03-05 21:19:45 +08:00
: 'GitHub Pages Deploy Action' ,
[Release] Version 4 (#589)
* Stop checking out workspace (#515)
* Stop checking out base branch before deployment, drop option.
* Don't check out default branch, as we don't check out base branch, drop option.
* Don't stash/unstash as we don't update the workdir, drop preserve option.
* Don't init the workspace
* Only fetch the remote branch if it exists, only with depth 1.
* Rely on previous checkouts to have handled lfs files correctly, drop option.
* Update README, action.yml, integration tests
* Set up eslint for test files. (#517)
* Add DRY_RUN option, passing --dry-run to git push. (#526)
See #499 for the proposal.
* Simplifies Token Setup (#530)
* Token simplification
* Access Token / Github Token -> Token
* Oops
* Typos
* Update README.md
* Update README.md
* Update action.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Adjust codeql action to latest recommendations (#540)
Also, add the dev and release branches, and drop master.
* Add workflow to update build and node_modules on release branches (#541)
* Stores username/email in secrets
* Removing stale bot integration
* Test current code base as an integration test for PRs and pushes (#505)
* Add a build step to create lib and node_modules artifact
* Run integration test with built dist and current SHA as base
For pull requests, the github.sha is the sha of the merge to the
target branch, not the head of the PR. Special case that.
* Use v2 checkout, and DRY_RUN for the integration test.
I also made the branches more generic, as there are now more of them.
* Fix #536, don't push at all on dryRun
Also add tests for dryRun and singleCommit and generateBranch
code flows.
* Try to fix dryRun on new remote branches, refactor fetch
* Try to fix dryRun, only fetch if origin branch exists
* Refactor worktree setup to include branch generation and setup for singleCommit
This is a continuation of the no-checkout work, and sadly suggested pretty
intensive changes.
* Set up git config to fix tests, also make debugging easier
* Add matrix for existing and non-existing branch
* Add matrix for singleCommit and not
* Drop GITHUB_TOKEN, add DRY_RUN to action.yml
* When deploying existing branch, add a modifcation and deploy again
* Force branch checkout to work in redeployment scenarios
* Make singleCommit easier to see in job descriptions
* Review comments
* Add a test-only property to action to test code paths with remote branch.
* Introduce TestFlag enum to signal different test scenarios to unit tests
* Fix util.test.ts
* Update worktree.ts
* Fix a few nits in tests and automation. Don't try to wordcount ls-rem… (#546)
* Fix a few nits in tests and automation. Don't try to wordcount ls-remote.
Nits in tests are around undoing changes made to the environment,
and to not modify the checkout.
* Describe suite with empty SHA
* Lowercase Inputs (#547)
* Lowercases inputs
* Adjusts workflow tests and deployment_status
* Use multi-line string for clean-exclude patterns. (#553)
As this change is subtle, I'm taking the opportunity to change
the underscore for the hyphen, which makes it less likely that
users of this action will just pass in an old json array.
* Hyphenate inputs and outputs, add step output, fix #558 (#559)
* Hyphenate inputs and outputs, add step output, fix #558
I've also tried to make the clean docs a bit clearer, and consistent
about clean being on my default. Still not totally happy with the intro
of the docs there, though.
* Add testing of step outputs to build integration tests
* Security Docs
* Integration tests
* Revert "Integration tests"
This reverts commit 639ff537d5bf88b668efb3a56d361e2a03f008c9.
* Native SSH Key Support (#569)
* SSH Key Support :key:
* Update ssh.ts
* Update src/ssh.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* README fixes/etc
* Unit Tests & README
* ssh key
* Update README.md
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update integration.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Deployment Issues (#583)
* Update git.ts
* Tests
* Update git.ts
* Formatting
* Update src/git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* TestFlag
* Logging
* Update git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* Codespace Support (#584)
* Add files via upload
* Update README.md
* Add files via upload
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* SSH Issues (#588)
* Unsets Persisted Credentials (#587)
* Persist
* Config Setup/Tests
* Assets
* Update git.ts
* Spacing
* Update integration.yml
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
2021-02-06 11:05:18 +08:00
repositoryName : ! isNullOrUndefined ( getInput ( 'repository-name' ) )
? getInput ( 'repository-name' )
2020-03-02 21:37:55 +08:00
: repository && repository . full_name
? repository . full_name
: process . env . GITHUB_REPOSITORY ,
[Release] Version 4 (#589)
* Stop checking out workspace (#515)
* Stop checking out base branch before deployment, drop option.
* Don't check out default branch, as we don't check out base branch, drop option.
* Don't stash/unstash as we don't update the workdir, drop preserve option.
* Don't init the workspace
* Only fetch the remote branch if it exists, only with depth 1.
* Rely on previous checkouts to have handled lfs files correctly, drop option.
* Update README, action.yml, integration tests
* Set up eslint for test files. (#517)
* Add DRY_RUN option, passing --dry-run to git push. (#526)
See #499 for the proposal.
* Simplifies Token Setup (#530)
* Token simplification
* Access Token / Github Token -> Token
* Oops
* Typos
* Update README.md
* Update README.md
* Update action.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Adjust codeql action to latest recommendations (#540)
Also, add the dev and release branches, and drop master.
* Add workflow to update build and node_modules on release branches (#541)
* Stores username/email in secrets
* Removing stale bot integration
* Test current code base as an integration test for PRs and pushes (#505)
* Add a build step to create lib and node_modules artifact
* Run integration test with built dist and current SHA as base
For pull requests, the github.sha is the sha of the merge to the
target branch, not the head of the PR. Special case that.
* Use v2 checkout, and DRY_RUN for the integration test.
I also made the branches more generic, as there are now more of them.
* Fix #536, don't push at all on dryRun
Also add tests for dryRun and singleCommit and generateBranch
code flows.
* Try to fix dryRun on new remote branches, refactor fetch
* Try to fix dryRun, only fetch if origin branch exists
* Refactor worktree setup to include branch generation and setup for singleCommit
This is a continuation of the no-checkout work, and sadly suggested pretty
intensive changes.
* Set up git config to fix tests, also make debugging easier
* Add matrix for existing and non-existing branch
* Add matrix for singleCommit and not
* Drop GITHUB_TOKEN, add DRY_RUN to action.yml
* When deploying existing branch, add a modifcation and deploy again
* Force branch checkout to work in redeployment scenarios
* Make singleCommit easier to see in job descriptions
* Review comments
* Add a test-only property to action to test code paths with remote branch.
* Introduce TestFlag enum to signal different test scenarios to unit tests
* Fix util.test.ts
* Update worktree.ts
* Fix a few nits in tests and automation. Don't try to wordcount ls-rem… (#546)
* Fix a few nits in tests and automation. Don't try to wordcount ls-remote.
Nits in tests are around undoing changes made to the environment,
and to not modify the checkout.
* Describe suite with empty SHA
* Lowercase Inputs (#547)
* Lowercases inputs
* Adjusts workflow tests and deployment_status
* Use multi-line string for clean-exclude patterns. (#553)
As this change is subtle, I'm taking the opportunity to change
the underscore for the hyphen, which makes it less likely that
users of this action will just pass in an old json array.
* Hyphenate inputs and outputs, add step output, fix #558 (#559)
* Hyphenate inputs and outputs, add step output, fix #558
I've also tried to make the clean docs a bit clearer, and consistent
about clean being on my default. Still not totally happy with the intro
of the docs there, though.
* Add testing of step outputs to build integration tests
* Security Docs
* Integration tests
* Revert "Integration tests"
This reverts commit 639ff537d5bf88b668efb3a56d361e2a03f008c9.
* Native SSH Key Support (#569)
* SSH Key Support :key:
* Update ssh.ts
* Update src/ssh.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* README fixes/etc
* Unit Tests & README
* ssh key
* Update README.md
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update integration.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Deployment Issues (#583)
* Update git.ts
* Tests
* Update git.ts
* Formatting
* Update src/git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* TestFlag
* Logging
* Update git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* Codespace Support (#584)
* Add files via upload
* Update README.md
* Add files via upload
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* SSH Issues (#588)
* Unsets Persisted Credentials (#587)
* Persist
* Config Setup/Tests
* Assets
* Update git.ts
* Spacing
* Update integration.yml
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
2021-02-06 11:05:18 +08:00
token : getInput ( 'token' ) ,
singleCommit : ! isNullOrUndefined ( getInput ( 'single-commit' ) )
? getInput ( 'single-commit' ) . toLowerCase ( ) === 'true'
2020-06-26 20:18:23 +08:00
: false ,
[Release] Version 4 (#589)
* Stop checking out workspace (#515)
* Stop checking out base branch before deployment, drop option.
* Don't check out default branch, as we don't check out base branch, drop option.
* Don't stash/unstash as we don't update the workdir, drop preserve option.
* Don't init the workspace
* Only fetch the remote branch if it exists, only with depth 1.
* Rely on previous checkouts to have handled lfs files correctly, drop option.
* Update README, action.yml, integration tests
* Set up eslint for test files. (#517)
* Add DRY_RUN option, passing --dry-run to git push. (#526)
See #499 for the proposal.
* Simplifies Token Setup (#530)
* Token simplification
* Access Token / Github Token -> Token
* Oops
* Typos
* Update README.md
* Update README.md
* Update action.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Adjust codeql action to latest recommendations (#540)
Also, add the dev and release branches, and drop master.
* Add workflow to update build and node_modules on release branches (#541)
* Stores username/email in secrets
* Removing stale bot integration
* Test current code base as an integration test for PRs and pushes (#505)
* Add a build step to create lib and node_modules artifact
* Run integration test with built dist and current SHA as base
For pull requests, the github.sha is the sha of the merge to the
target branch, not the head of the PR. Special case that.
* Use v2 checkout, and DRY_RUN for the integration test.
I also made the branches more generic, as there are now more of them.
* Fix #536, don't push at all on dryRun
Also add tests for dryRun and singleCommit and generateBranch
code flows.
* Try to fix dryRun on new remote branches, refactor fetch
* Try to fix dryRun, only fetch if origin branch exists
* Refactor worktree setup to include branch generation and setup for singleCommit
This is a continuation of the no-checkout work, and sadly suggested pretty
intensive changes.
* Set up git config to fix tests, also make debugging easier
* Add matrix for existing and non-existing branch
* Add matrix for singleCommit and not
* Drop GITHUB_TOKEN, add DRY_RUN to action.yml
* When deploying existing branch, add a modifcation and deploy again
* Force branch checkout to work in redeployment scenarios
* Make singleCommit easier to see in job descriptions
* Review comments
* Add a test-only property to action to test code paths with remote branch.
* Introduce TestFlag enum to signal different test scenarios to unit tests
* Fix util.test.ts
* Update worktree.ts
* Fix a few nits in tests and automation. Don't try to wordcount ls-rem… (#546)
* Fix a few nits in tests and automation. Don't try to wordcount ls-remote.
Nits in tests are around undoing changes made to the environment,
and to not modify the checkout.
* Describe suite with empty SHA
* Lowercase Inputs (#547)
* Lowercases inputs
* Adjusts workflow tests and deployment_status
* Use multi-line string for clean-exclude patterns. (#553)
As this change is subtle, I'm taking the opportunity to change
the underscore for the hyphen, which makes it less likely that
users of this action will just pass in an old json array.
* Hyphenate inputs and outputs, add step output, fix #558 (#559)
* Hyphenate inputs and outputs, add step output, fix #558
I've also tried to make the clean docs a bit clearer, and consistent
about clean being on my default. Still not totally happy with the intro
of the docs there, though.
* Add testing of step outputs to build integration tests
* Security Docs
* Integration tests
* Revert "Integration tests"
This reverts commit 639ff537d5bf88b668efb3a56d361e2a03f008c9.
* Native SSH Key Support (#569)
* SSH Key Support :key:
* Update ssh.ts
* Update src/ssh.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* README fixes/etc
* Unit Tests & README
* ssh key
* Update README.md
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update integration.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Deployment Issues (#583)
* Update git.ts
* Tests
* Update git.ts
* Formatting
* Update src/git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* TestFlag
* Logging
* Update git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* Codespace Support (#584)
* Add files via upload
* Update README.md
* Add files via upload
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* SSH Issues (#588)
* Unsets Persisted Credentials (#587)
* Persist
* Config Setup/Tests
* Assets
* Update git.ts
* Spacing
* Update integration.yml
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
2021-02-06 11:05:18 +08:00
silent : ! isNullOrUndefined ( getInput ( 'silent' ) )
? getInput ( 'silent' ) . toLowerCase ( ) === 'true'
2020-03-31 08:44:09 +08:00
: false ,
[Release] Version 4 (#589)
* Stop checking out workspace (#515)
* Stop checking out base branch before deployment, drop option.
* Don't check out default branch, as we don't check out base branch, drop option.
* Don't stash/unstash as we don't update the workdir, drop preserve option.
* Don't init the workspace
* Only fetch the remote branch if it exists, only with depth 1.
* Rely on previous checkouts to have handled lfs files correctly, drop option.
* Update README, action.yml, integration tests
* Set up eslint for test files. (#517)
* Add DRY_RUN option, passing --dry-run to git push. (#526)
See #499 for the proposal.
* Simplifies Token Setup (#530)
* Token simplification
* Access Token / Github Token -> Token
* Oops
* Typos
* Update README.md
* Update README.md
* Update action.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Adjust codeql action to latest recommendations (#540)
Also, add the dev and release branches, and drop master.
* Add workflow to update build and node_modules on release branches (#541)
* Stores username/email in secrets
* Removing stale bot integration
* Test current code base as an integration test for PRs and pushes (#505)
* Add a build step to create lib and node_modules artifact
* Run integration test with built dist and current SHA as base
For pull requests, the github.sha is the sha of the merge to the
target branch, not the head of the PR. Special case that.
* Use v2 checkout, and DRY_RUN for the integration test.
I also made the branches more generic, as there are now more of them.
* Fix #536, don't push at all on dryRun
Also add tests for dryRun and singleCommit and generateBranch
code flows.
* Try to fix dryRun on new remote branches, refactor fetch
* Try to fix dryRun, only fetch if origin branch exists
* Refactor worktree setup to include branch generation and setup for singleCommit
This is a continuation of the no-checkout work, and sadly suggested pretty
intensive changes.
* Set up git config to fix tests, also make debugging easier
* Add matrix for existing and non-existing branch
* Add matrix for singleCommit and not
* Drop GITHUB_TOKEN, add DRY_RUN to action.yml
* When deploying existing branch, add a modifcation and deploy again
* Force branch checkout to work in redeployment scenarios
* Make singleCommit easier to see in job descriptions
* Review comments
* Add a test-only property to action to test code paths with remote branch.
* Introduce TestFlag enum to signal different test scenarios to unit tests
* Fix util.test.ts
* Update worktree.ts
* Fix a few nits in tests and automation. Don't try to wordcount ls-rem… (#546)
* Fix a few nits in tests and automation. Don't try to wordcount ls-remote.
Nits in tests are around undoing changes made to the environment,
and to not modify the checkout.
* Describe suite with empty SHA
* Lowercase Inputs (#547)
* Lowercases inputs
* Adjusts workflow tests and deployment_status
* Use multi-line string for clean-exclude patterns. (#553)
As this change is subtle, I'm taking the opportunity to change
the underscore for the hyphen, which makes it less likely that
users of this action will just pass in an old json array.
* Hyphenate inputs and outputs, add step output, fix #558 (#559)
* Hyphenate inputs and outputs, add step output, fix #558
I've also tried to make the clean docs a bit clearer, and consistent
about clean being on my default. Still not totally happy with the intro
of the docs there, though.
* Add testing of step outputs to build integration tests
* Security Docs
* Integration tests
* Revert "Integration tests"
This reverts commit 639ff537d5bf88b668efb3a56d361e2a03f008c9.
* Native SSH Key Support (#569)
* SSH Key Support :key:
* Update ssh.ts
* Update src/ssh.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* README fixes/etc
* Unit Tests & README
* ssh key
* Update README.md
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update integration.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Deployment Issues (#583)
* Update git.ts
* Tests
* Update git.ts
* Formatting
* Update src/git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* TestFlag
* Logging
* Update git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* Codespace Support (#584)
* Add files via upload
* Update README.md
* Add files via upload
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* SSH Issues (#588)
* Unsets Persisted Credentials (#587)
* Persist
* Config Setup/Tests
* Assets
* Update git.ts
* Spacing
* Update integration.yml
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
2021-02-06 11:05:18 +08:00
sshKey : isNullOrUndefined ( getInput ( 'ssh-key' ) )
? false
: ! isNullOrUndefined ( getInput ( 'ssh-key' ) ) &&
getInput ( 'ssh-key' ) . toLowerCase ( ) === 'true'
? true
: getInput ( 'ssh-key' ) ,
targetFolder : getInput ( 'target-folder' ) ,
2020-03-05 21:19:45 +08:00
workspace : process.env.GITHUB_WORKSPACE || ''
}
2020-05-15 05:24:32 +08:00
2020-10-18 00:26:46 +08:00
/** Types for the required action parameters. */
2020-10-15 22:20:15 +08:00
export type RequiredActionParameters = Pick <
ActionInterface ,
[Release] Version 4 (#589)
* Stop checking out workspace (#515)
* Stop checking out base branch before deployment, drop option.
* Don't check out default branch, as we don't check out base branch, drop option.
* Don't stash/unstash as we don't update the workdir, drop preserve option.
* Don't init the workspace
* Only fetch the remote branch if it exists, only with depth 1.
* Rely on previous checkouts to have handled lfs files correctly, drop option.
* Update README, action.yml, integration tests
* Set up eslint for test files. (#517)
* Add DRY_RUN option, passing --dry-run to git push. (#526)
See #499 for the proposal.
* Simplifies Token Setup (#530)
* Token simplification
* Access Token / Github Token -> Token
* Oops
* Typos
* Update README.md
* Update README.md
* Update action.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Adjust codeql action to latest recommendations (#540)
Also, add the dev and release branches, and drop master.
* Add workflow to update build and node_modules on release branches (#541)
* Stores username/email in secrets
* Removing stale bot integration
* Test current code base as an integration test for PRs and pushes (#505)
* Add a build step to create lib and node_modules artifact
* Run integration test with built dist and current SHA as base
For pull requests, the github.sha is the sha of the merge to the
target branch, not the head of the PR. Special case that.
* Use v2 checkout, and DRY_RUN for the integration test.
I also made the branches more generic, as there are now more of them.
* Fix #536, don't push at all on dryRun
Also add tests for dryRun and singleCommit and generateBranch
code flows.
* Try to fix dryRun on new remote branches, refactor fetch
* Try to fix dryRun, only fetch if origin branch exists
* Refactor worktree setup to include branch generation and setup for singleCommit
This is a continuation of the no-checkout work, and sadly suggested pretty
intensive changes.
* Set up git config to fix tests, also make debugging easier
* Add matrix for existing and non-existing branch
* Add matrix for singleCommit and not
* Drop GITHUB_TOKEN, add DRY_RUN to action.yml
* When deploying existing branch, add a modifcation and deploy again
* Force branch checkout to work in redeployment scenarios
* Make singleCommit easier to see in job descriptions
* Review comments
* Add a test-only property to action to test code paths with remote branch.
* Introduce TestFlag enum to signal different test scenarios to unit tests
* Fix util.test.ts
* Update worktree.ts
* Fix a few nits in tests and automation. Don't try to wordcount ls-rem… (#546)
* Fix a few nits in tests and automation. Don't try to wordcount ls-remote.
Nits in tests are around undoing changes made to the environment,
and to not modify the checkout.
* Describe suite with empty SHA
* Lowercase Inputs (#547)
* Lowercases inputs
* Adjusts workflow tests and deployment_status
* Use multi-line string for clean-exclude patterns. (#553)
As this change is subtle, I'm taking the opportunity to change
the underscore for the hyphen, which makes it less likely that
users of this action will just pass in an old json array.
* Hyphenate inputs and outputs, add step output, fix #558 (#559)
* Hyphenate inputs and outputs, add step output, fix #558
I've also tried to make the clean docs a bit clearer, and consistent
about clean being on my default. Still not totally happy with the intro
of the docs there, though.
* Add testing of step outputs to build integration tests
* Security Docs
* Integration tests
* Revert "Integration tests"
This reverts commit 639ff537d5bf88b668efb3a56d361e2a03f008c9.
* Native SSH Key Support (#569)
* SSH Key Support :key:
* Update ssh.ts
* Update src/ssh.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* README fixes/etc
* Unit Tests & README
* ssh key
* Update README.md
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update integration.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Deployment Issues (#583)
* Update git.ts
* Tests
* Update git.ts
* Formatting
* Update src/git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* TestFlag
* Logging
* Update git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* Codespace Support (#584)
* Add files via upload
* Update README.md
* Add files via upload
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* SSH Issues (#588)
* Unsets Persisted Credentials (#587)
* Persist
* Config Setup/Tests
* Assets
* Update git.ts
* Spacing
* Update integration.yml
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
2021-02-06 11:05:18 +08:00
'token' | 'sshKey' | 'branch' | 'folder' | 'isTest'
2020-10-07 21:34:20 +08:00
>
2020-05-15 05:24:32 +08:00
/** Status codes for the action. */
export enum Status {
SUCCESS = 'success' ,
FAILED = 'failed' ,
SKIPPED = 'skipped' ,
RUNNING = 'running'
}
2022-01-06 21:42:46 +08:00
/* Platform codes. */
export enum OperatingSystems {
LINUX = 'Linux' ,
WINDOWS = 'Windows' ,
MACOS = 'macOS'
}
export const SupportedOperatingSystems = [ OperatingSystems . LINUX ]
2022-01-06 22:50:18 +08:00
/* Excluded files. */
export enum DefaultExcludedFiles {
CNAME = 'CNAME' ,
NOJEKYLL = '.nojekyll' ,
SSH = '.ssh' ,
GIT = '.git' ,
GITHUB = '.github'
}