Commit Graph

85 Commits

Author SHA1 Message Date
Nick McCurdy
95ff531c09
Use major version tags (#1152) 2022-06-26 08:57:54 -04:00
Nick McCurdy
c0e8d739fd
Set default branch to gh-pages (fix #1151) (#1155)
* Set default branch to gh-pages (fix #1151)

* Fix documented requirement of branch
2022-06-26 08:51:18 -04:00
dependabot[bot]
338ece1815
Bump JamesIves/github-pages-deploy-action from 4.3.2 to 4.3.3 (#1098)
Bumps [JamesIves/github-pages-deploy-action](https://github.com/JamesIves/github-pages-deploy-action) from 4.3.2 to 4.3.3.
- [Release notes](https://github.com/JamesIves/github-pages-deploy-action/releases)
- [Commits](https://github.com/JamesIves/github-pages-deploy-action/compare/v4.3.2...v4.3.3)

---
updated-dependencies:
- dependency-name: JamesIves/github-pages-deploy-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-26 12:40:03 -04:00
dependabot[bot]
5cd1eefe64
Bump JamesIves/github-pages-deploy-action from 4.3.0 to 4.3.2 (#1091)
Bumps [JamesIves/github-pages-deploy-action](https://github.com/JamesIves/github-pages-deploy-action) from 4.3.0 to 4.3.2.
- [Release notes](https://github.com/JamesIves/github-pages-deploy-action/releases)
- [Commits](https://github.com/JamesIves/github-pages-deploy-action/compare/v4.3.0...v4.3.2)

---
updated-dependencies:
- dependency-name: JamesIves/github-pages-deploy-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-25 22:02:00 -04:00
James Ives
119d340e22 Formatting 2022-04-25 21:59:43 -04:00
James Ives
d34d41a21e Modifies permissions 2022-04-25 21:56:48 -04:00
James Ives
cee86d101e Update integration.yml 2022-04-23 15:55:13 -04:00
James Ives
1506a6c991 Update integration.yml 2022-04-23 15:10:50 -04:00
James Ives
aff13363e7
Update integration.yml 2022-04-14 14:50:24 -04:00
dependabot[bot]
a1740ed44f
Bump JamesIves/github-pages-deploy-action from 4.2.5 to 4.3.0 (#1071)
Bumps [JamesIves/github-pages-deploy-action](https://github.com/JamesIves/github-pages-deploy-action) from 4.2.5 to 4.3.0.
- [Release notes](https://github.com/JamesIves/github-pages-deploy-action/releases)
- [Commits](https://github.com/JamesIves/github-pages-deploy-action/compare/v4.2.5...v4.3.0)

---
updated-dependencies:
- dependency-name: JamesIves/github-pages-deploy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-05 06:47:46 -04:00
James Ives
01aec06874 Compile with Node 16 2022-04-04 09:42:48 -04:00
James Ives
6ae2891783 Update integration.yml 2022-04-04 09:36:17 -04:00
Ross Williams
95f8a2cd05
Resolve simultaneous deployments with rebase (#1054)
* Return early from dry run

Determining whether to create a merge commit would elicit a nested
conditional, which could be hard to parse for a human reader. This is
avoided by returning early as soon as possible for a dry run.

This also resolves the erroneous 'changes committed' message when no
changes were actually committed because of the dry run. A message
specific to dry-run is logged instead.

* Add force parameter to action interface

Existing behaviour is equivalent to force=true, so the default value is
true.

* Implement pull+rebase procedure

* Declare force parameter in action

* Detect both rejection syntaxes

* Return both stdout and stderr from execute

* Ignore non-zero exit status on push

* Remove unnecessary error catch

* Fetch and rebase in separate steps

* Explicitly bind incoming branch

I think the fetch will update the origin/gh-pages branch but not the
gh-pages branch, despite requesting gh-pages. This means that when I
later attempt to rebase the temp branch on top of the gh-pages branch,
there will be nothing to do, because that's already where it is.

* Implement attempt limit

I don't expect this to ever require more than one attempt in production,
but in theory it's possible that this procedure could loop forever.

We would need to keep fetching and rebasing if changes keep being added
to the remote. In practice, I believe this would only happen if there
are lots of workflows simultaneously deploying to the same branch, all
using this action. In this case only one would be able to secure a lock
at a time, leading to the total number of attempts being equal to the
number of simultaneous deployments, assuming each deployment makes each
attempt at the exact same time.

The limit may need to be increased or even be configurable, but 3 should
cover most uses.

* Update tests for execute output split

* Document 'force' parameter

* Create integration test for rebase procedure

This test is composed of 3 jobs.

The first two jobs run simultaneously, and as such both depend on the
previous integration test only. The final job cleans up afterwards, and
depends on both of the prior jobs.

The two jobs are identical except that they both create a temporary file
in a different location. This is to ensure that they conflict. Correctly
resolving this conflict by rebasing one deployment over the other,
resulting in a deployment containing both files, indicates a successful
test.
2022-04-04 07:18:27 -04:00
dependabot[bot]
8cb2e21c07
Bump actions/checkout from 2.4.0 to 3 (#1050)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.4.0 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.4.0...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-02 06:48:26 -05:00
dependabot[bot]
c4fb408c85
Bump actions/setup-node from 2.5.1 to 3 (#1048)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2.5.1 to 3.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v2.5.1...v3)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-26 17:17:42 -05:00
dependabot[bot]
ca88c7228a
Bump JamesIves/github-pages-deploy-action from 4.2.3 to 4.2.5 (#1041) 2022-02-17 06:19:08 -05:00
dependabot[bot]
1de53dd290
Bump JamesIves/github-pages-deploy-action from 4.2.2 to 4.2.3 (#1025) 2022-02-01 06:06:40 -05:00
James Ives
91d4e8f962
Part 1: Logging Improvements (#1022)
* Part 1 of Logging Improvements

* Update util.test.ts

* Update util.test.ts

* Update util.test.ts

* Update util.test.ts

* Adjustments to tests

* Update util.test.ts

* Update util.ts
2022-01-31 08:08:23 -05:00
James Ives
fee58dc841 Use major version for integration tests 2022-01-11 23:22:19 -05:00
dependabot[bot]
7210ba87fd
Bump JamesIves/github-pages-deploy-action from 4.2.1 to 4.2.2 (#1002)
Bumps [JamesIves/github-pages-deploy-action](https://github.com/JamesIves/github-pages-deploy-action) from 4.2.1 to 4.2.2.
- [Release notes](https://github.com/JamesIves/github-pages-deploy-action/releases)
- [Commits](https://github.com/JamesIves/github-pages-deploy-action/compare/4.2.1...v4.2.2)

---
updated-dependencies:
- dependency-name: JamesIves/github-pages-deploy-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-11 08:13:14 -05:00
dependabot[bot]
7456853943
Bump JamesIves/github-pages-deploy-action from 4.2.0 to 4.2.1 (#998)
Bumps [JamesIves/github-pages-deploy-action](https://github.com/JamesIves/github-pages-deploy-action) from 4.2.0 to 4.2.1.
- [Release notes](https://github.com/JamesIves/github-pages-deploy-action/releases)
- [Commits](https://github.com/JamesIves/github-pages-deploy-action/compare/4.2.0...4.2.1)

---
updated-dependencies:
- dependency-name: JamesIves/github-pages-deploy-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-10 08:02:21 -05:00
dependabot[bot]
53efaaaccb
Bump JamesIves/github-pages-deploy-action from 4.1.9 to 4.2.0 (#992) 2022-01-07 10:30:46 +00:00
James Ives
a7cf017c75
Ignore Case (#987)
* Update git.ts

* Formatting

* formatting

* Tests
2022-01-06 09:50:18 -05:00
dependabot[bot]
43e20fe3ca
Bump dawidd6/action-delete-branch from 2.0.1 to 3.1.0 (#982)
Bumps [dawidd6/action-delete-branch](https://github.com/dawidd6/action-delete-branch) from 2.0.1 to 3.1.0.
- [Release notes](https://github.com/dawidd6/action-delete-branch/releases)
- [Commits](https://github.com/dawidd6/action-delete-branch/compare/v2.0.1...v3.1.0)

---
updated-dependencies:
- dependency-name: dawidd6/action-delete-branch
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-06 08:47:01 -05:00
dependabot[bot]
e92afa83cc
Bump actions/setup-node from 1.4.4 to 2.5.1 (#983)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 1.4.4 to 2.5.1.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v1.4.4...v2.5.1)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-06 08:46:55 -05:00
dependabot[bot]
d97d054194
Bump webfactory/ssh-agent from 0.4.1 to 0.5.4 (#984)
Bumps [webfactory/ssh-agent](https://github.com/webfactory/ssh-agent) from 0.4.1 to 0.5.4.
- [Release notes](https://github.com/webfactory/ssh-agent/releases)
- [Changelog](https://github.com/webfactory/ssh-agent/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webfactory/ssh-agent/compare/v0.4.1...v0.5.4)

---
updated-dependencies:
- dependency-name: webfactory/ssh-agent
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-06 08:46:48 -05:00
dependabot[bot]
6476a4409f
Bump JamesIves/github-pages-deploy-action from 4.0.0 to 4.1.9 (#986)
Bumps [JamesIves/github-pages-deploy-action](https://github.com/JamesIves/github-pages-deploy-action) from 4.0.0 to 4.1.9.
- [Release notes](https://github.com/JamesIves/github-pages-deploy-action/releases)
- [Commits](https://github.com/JamesIves/github-pages-deploy-action/compare/4.0.0...4.1.9)

---
updated-dependencies:
- dependency-name: JamesIves/github-pages-deploy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-06 08:46:32 -05:00
James Ives
a5d8ac6765 Modifies versioning 2022-01-06 08:39:45 -05:00
James Ives
2d9f6f66a1 🔧 Node Version 2021-11-18 08:12:09 -05:00
James Ives
0afb880e95
Allow Subsequent Deployments (#690)
* Removing artifacts

* Update git.ts

* Update git.ts

* Fixng up unit tests

* Update main.test.ts

* Update integration.yml

* Update integration.yml
2021-05-10 09:17:42 -04:00
James Ives
4bb15711fb
Eslint improvements (#686)
* Initial Pass at new configs

* Improved Linting/Formatting

* Update execute.ts

* Update main.test.ts

* Change typing

* Update git.ts

* Update worktree.ts

* Update worktree.ts

* Update worktree.ts

* Maybe

* Update execute.ts
2021-04-26 18:57:10 -04:00
James Ives
275cab7b2f Restore 2021-02-28 09:10:36 -05:00
James Ives
8071991fe8 Double Quotes not allowed? 2021-02-28 09:09:15 -05:00
James Ives
207c32e0dc Integration Test 2021-02-28 09:08:07 -05:00
James Ives
cece268304 Update integration.yml 2021-02-14 11:03:56 -05:00
James Ives
b94aa2504f Update integration.yml 2021-02-14 11:02:41 -05:00
James Ives
476151d9aa Integration Test Upgrades 2021-02-08 10:06:11 -05:00
James Ives
4f4d7a7b17 Integration adjustments 2021-02-08 00:18:51 -05:00
James Ives
fb0dfed981 Tempoarily disabling version patching for release 2021-02-08 00:17:07 -05:00
James Ives
8f515b0d1f
Update integration.yml 2021-02-05 23:09:56 -05:00
James Ives
68e6090365
Update integration.yml 2021-02-05 22:59:40 -05:00
James Ives
8bc1c10da7
Update integration.yml 2021-02-05 22:56:31 -05:00
James Ives
a82e78fb36
Update integration.yml 2021-02-05 22:43:41 -05:00
James Ives
2bda9272a8
Update integration.yml 2021-02-05 22:39:07 -05:00
James Ives
d7664c8081
Update integration.yml 2021-02-05 22:12:59 -05:00
James Ives
442182742b
[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 639ff537d5.

* Native SSH Key Support (#569)

* SSH Key Support 🔑

* 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-05 22:05:18 -05:00
James Ives
d91bc43f92 Fixes int tests 2020-11-17 15:36:57 -05:00
James Ives
ce17a21cd5 Setup node workflows 2020-11-17 11:57:42 -05:00
James Ives
881130db25
Update integration.yml 2020-11-17 00:43:03 -05:00
James Ives
0e70ab21c6
Update integration.yml 2020-09-12 18:57:20 -04:00