From bd8e5da3f8dd49805b8dbeb64e324e13f816e0bd Mon Sep 17 00:00:00 2001 From: James Ives Date: Sat, 23 Apr 2022 21:16:38 +0000 Subject: [PATCH 1/6] =?UTF-8?q?Release=204.3.2=20=F0=9F=93=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index caf52466b..80f94fe51 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@jamesives/github-pages-deploy-action", "description": "GitHub action for building a project and deploying it to GitHub pages.", "author": "James Ives (https://jamesiv.es)", - "version": "4.3.1", + "version": "4.3.2", "license": "MIT", "main": "lib/lib.js", "types": "lib/lib.d.ts", From d34d41a21e013b2b09dbd41b3a1158f97cc69e9c Mon Sep 17 00:00:00 2001 From: James Ives Date: Mon, 25 Apr 2022 21:56:48 -0400 Subject: [PATCH 2/6] Modifies permissions --- .github/workflows/integration.yml | 2 +- src/constants.ts | 5 ++--- src/git.ts | 14 +++++++++----- src/ssh.ts | 9 ++++++--- src/util.ts | 6 +++--- 5 files changed, 21 insertions(+), 15 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 95d6e0944..681bc8374 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -223,7 +223,7 @@ jobs: integration-container, integration-ssh, integration-ssh-third-party-client, - integration-env + integration-env, ] runs-on: ubuntu-latest steps: diff --git a/src/constants.ts b/src/constants.ts index 6505b7781..80d98e63c 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -105,9 +105,8 @@ export const action: ActionInterface = { ? getInput('git-config-email') : pusher && pusher.email ? pusher.email - : `${ - process.env.GITHUB_ACTOR || 'github-pages-deploy-action' - }@users.noreply.${ + : `${process.env.GITHUB_ACTOR || + 'github-pages-deploy-action'}@users.noreply.${ process.env.GITHUB_SERVER_URL ? stripProtocolFromUrl(process.env.GITHUB_SERVER_URL) : 'github.com' diff --git a/src/git.ts b/src/git.ts index 157c53cb8..1bf788bd7 100644 --- a/src/git.ts +++ b/src/git.ts @@ -131,11 +131,15 @@ export async function deploy(action: ActionInterface): Promise { await generateWorktree(action, temporaryDeploymentDirectory, branchExists) /* Relaxes permissions of folder due to be deployed so rsync can write to/from it. */ - await execute( - `chmod -R +rw ${action.folderPath}`, - action.workspace, - action.silent - ) + try { + await execute( + `chmod -R +rw ${action.folderPath}`, + action.workspace, + action.silent + ) + } catch { + info(`Unable to modify permissionsā€¦`) + } // Ensures that items that need to be excluded from the clean job get parsed. let excludes = '' diff --git a/src/ssh.ts b/src/ssh.ts index 1c9039201..359857424 100644 --- a/src/ssh.ts +++ b/src/ssh.ts @@ -23,11 +23,14 @@ export async function configureSSH(action: ActionInterface): Promise { appendFileSync(sshKnownHostsDirectory, sshGitHubKnownHostDss) // Initializes SSH agent. - const agentOutput = execFileSync('ssh-agent').toString().split('\n') + const agentOutput = execFileSync('ssh-agent') + .toString() + .split('\n') agentOutput.map(line => { - const exportableVariables = - /^(SSH_AUTH_SOCK|SSH_AGENT_PID)=(.*); export \1/.exec(line) + const exportableVariables = /^(SSH_AUTH_SOCK|SSH_AGENT_PID)=(.*); export \1/.exec( + line + ) if (exportableVariables && exportableVariables.length) { exportVariable(exportableVariables[1], exportableVariables[2]) diff --git a/src/util.ts b/src/util.ts index 59f7d9821..600b2620f 100644 --- a/src/util.ts +++ b/src/util.ts @@ -96,9 +96,9 @@ export const suppressSensitiveInformation = ( return value } - const orderedByLength = ( - [action.token, action.repositoryPath].filter(Boolean) as string[] - ).sort((a, b) => b.length - a.length) + const orderedByLength = ([action.token, action.repositoryPath].filter( + Boolean + ) as string[]).sort((a, b) => b.length - a.length) for (const find of orderedByLength) { value = replaceAll(value, find, '***') From 119d340e2258367e135e1ee9f1388f6e797dc959 Mon Sep 17 00:00:00 2001 From: James Ives Date: Mon, 25 Apr 2022 21:59:43 -0400 Subject: [PATCH 3/6] Formatting --- .github/workflows/integration.yml | 2 +- src/constants.ts | 5 +++-- src/ssh.ts | 9 +++------ src/util.ts | 6 +++--- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 681bc8374..95d6e0944 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -223,7 +223,7 @@ jobs: integration-container, integration-ssh, integration-ssh-third-party-client, - integration-env, + integration-env ] runs-on: ubuntu-latest steps: diff --git a/src/constants.ts b/src/constants.ts index 80d98e63c..6505b7781 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -105,8 +105,9 @@ export const action: ActionInterface = { ? getInput('git-config-email') : pusher && pusher.email ? pusher.email - : `${process.env.GITHUB_ACTOR || - 'github-pages-deploy-action'}@users.noreply.${ + : `${ + process.env.GITHUB_ACTOR || 'github-pages-deploy-action' + }@users.noreply.${ process.env.GITHUB_SERVER_URL ? stripProtocolFromUrl(process.env.GITHUB_SERVER_URL) : 'github.com' diff --git a/src/ssh.ts b/src/ssh.ts index 359857424..1c9039201 100644 --- a/src/ssh.ts +++ b/src/ssh.ts @@ -23,14 +23,11 @@ export async function configureSSH(action: ActionInterface): Promise { appendFileSync(sshKnownHostsDirectory, sshGitHubKnownHostDss) // Initializes SSH agent. - const agentOutput = execFileSync('ssh-agent') - .toString() - .split('\n') + const agentOutput = execFileSync('ssh-agent').toString().split('\n') agentOutput.map(line => { - const exportableVariables = /^(SSH_AUTH_SOCK|SSH_AGENT_PID)=(.*); export \1/.exec( - line - ) + const exportableVariables = + /^(SSH_AUTH_SOCK|SSH_AGENT_PID)=(.*); export \1/.exec(line) if (exportableVariables && exportableVariables.length) { exportVariable(exportableVariables[1], exportableVariables[2]) diff --git a/src/util.ts b/src/util.ts index 600b2620f..59f7d9821 100644 --- a/src/util.ts +++ b/src/util.ts @@ -96,9 +96,9 @@ export const suppressSensitiveInformation = ( return value } - const orderedByLength = ([action.token, action.repositoryPath].filter( - Boolean - ) as string[]).sort((a, b) => b.length - a.length) + const orderedByLength = ( + [action.token, action.repositoryPath].filter(Boolean) as string[] + ).sort((a, b) => b.length - a.length) for (const find of orderedByLength) { value = replaceAll(value, find, '***') From 5cd1eefe6421e68e1efc36a0787928f8b199d280 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Apr 2022 22:02:00 -0400 Subject: [PATCH 4/6] 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] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/deploy.yml | 2 +- .github/workflows/integration.yml | 26 +++++++++++++------------- .github/workflows/sponsors.yml | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2c658e902..32e67c3b9 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,7 +13,7 @@ jobs: # Workflow dispatch event that pushes the current version to the release branch. # From here the secondary production deployment workflow will trigger to build the dependencies. - name: Deploy šŸš€ - uses: JamesIves/github-pages-deploy-action@v4.3.0 + uses: JamesIves/github-pages-deploy-action@v4.3.2 with: branch: releases/v4 folder: . diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 95d6e0944..ce698619b 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -28,7 +28,7 @@ jobs: uses: actions/checkout@v3 - name: Build and Deploy - uses: JamesIves/github-pages-deploy-action@releases/v4 + uses: JamesIves/github-pages-deploy-action@v4.3.2 with: git-config-name: Montezuma git-config-email: montezuma@jamesiv.es @@ -49,7 +49,7 @@ jobs: uses: actions/checkout@v3 - name: Build and Deploy - uses: JamesIves/github-pages-deploy-action@releases/v4 + uses: JamesIves/github-pages-deploy-action@v4.3.2 with: token: ${{ secrets.ACCESS_TOKEN }} branch: gh-pages @@ -76,7 +76,7 @@ jobs: persist-credentials: false - name: Build and Deploy - uses: JamesIves/github-pages-deploy-action@releases/v4 + uses: JamesIves/github-pages-deploy-action@v4.3.2 with: branch: gh-pages folder: integration @@ -108,7 +108,7 @@ jobs: apt-get update && apt-get install -y rsync - name: Build and Deploy - uses: JamesIves/github-pages-deploy-action@releases/v4 + uses: JamesIves/github-pages-deploy-action@v4.3.2 with: branch: gh-pages folder: integration @@ -132,7 +132,7 @@ jobs: persist-credentials: false - name: Build and Deploy - uses: JamesIves/github-pages-deploy-action@releases/v4 + uses: JamesIves/github-pages-deploy-action@v4.3.2 with: ssh-key: ${{ secrets.DEPLOY_KEY }} branch: gh-pages @@ -162,7 +162,7 @@ jobs: ssh-private-key: ${{ secrets.DEPLOY_KEY }} - name: Build and Deploy - uses: JamesIves/github-pages-deploy-action@releases/v4 + uses: JamesIves/github-pages-deploy-action@v4.3.2 with: ssh-key: true branch: gh-pages @@ -191,7 +191,7 @@ jobs: persist-credentials: false - name: Build and Deploy - uses: JamesIves/github-pages-deploy-action@releases/v4 + uses: JamesIves/github-pages-deploy-action@v4.3.2 with: ssh-key: ${{ secrets.DEPLOY_KEY }} branch: gh-pages @@ -200,7 +200,7 @@ jobs: silent: true - name: Build and Deploy - uses: JamesIves/github-pages-deploy-action@releases/v4 + uses: JamesIves/github-pages-deploy-action@v4.3.2 with: ssh-key: ${{ secrets.DEPLOY_KEY }} branch: gh-pages @@ -233,7 +233,7 @@ jobs: persist-credentials: false - name: Build and Deploy - uses: JamesIves/github-pages-deploy-action@releases/v4 + uses: JamesIves/github-pages-deploy-action@v4.3.2 with: token: ${{ secrets.ACCESS_TOKEN }} branch: gh-pages @@ -252,7 +252,7 @@ jobs: persist-credentials: false - name: Build and Deploy - uses: JamesIves/github-pages-deploy-action@releases/v4 + uses: JamesIves/github-pages-deploy-action@v4.3.2 with: token: ${{ secrets.ACCESS_TOKEN }} branch: integration-test-delete-prod @@ -261,7 +261,7 @@ jobs: silent: true - name: Build and Deploy - uses: JamesIves/github-pages-deploy-action@releases/v4 + uses: JamesIves/github-pages-deploy-action@v4.3.2 with: token: ${{ secrets.ACCESS_TOKEN }} branch: integration-test-delete-prod @@ -289,7 +289,7 @@ jobs: run: echo $RANDOM > integration/1 - name: Build and Deploy - uses: JamesIves/github-pages-deploy-action@releases/v4 + uses: JamesIves/github-pages-deploy-action@v4.3.2 with: git-config-name: Montezuma git-config-email: montezuma@jamesiv.es @@ -311,7 +311,7 @@ jobs: run: echo $RANDOM > integration/2 - name: Build and Deploy - uses: JamesIves/github-pages-deploy-action@releases/v4 + uses: JamesIves/github-pages-deploy-action@v4.3.2 with: git-config-name: Montezuma git-config-email: montezuma@jamesiv.es diff --git a/.github/workflows/sponsors.yml b/.github/workflows/sponsors.yml index 67e52471b..1e3ad2442 100644 --- a/.github/workflows/sponsors.yml +++ b/.github/workflows/sponsors.yml @@ -29,7 +29,7 @@ jobs: marker: 'premium' - name: Deploy to GitHub Pages - uses: JamesIves/github-pages-deploy-action@v4.3.0 + uses: JamesIves/github-pages-deploy-action@v4.3.2 with: branch: dev folder: '.' From 0d30c74a47191b99f69e2af8579c0187ab8dfca6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Apr 2022 22:02:53 -0400 Subject: [PATCH 5/6] Bump eslint-plugin-jest from 26.1.4 to 26.1.5 (#1090) Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 26.1.4 to 26.1.5. - [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases) - [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v26.1.4...v26.1.5) --- updated-dependencies: - dependency-name: eslint-plugin-jest dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 80f94fe51..1602f368b 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@typescript-eslint/parser": "4.33.0", "eslint": "7.32.0", "eslint-config-prettier": "8.5.0", - "eslint-plugin-jest": "26.1.4", + "eslint-plugin-jest": "26.1.5", "eslint-plugin-prettier": "4.0.0", "jest": "26.6.3", "jest-circus": "27.5.1", diff --git a/yarn.lock b/yarn.lock index 47bf1b087..655e2f6f7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2150,10 +2150,10 @@ eslint-config-prettier@8.5.0: resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz#5a81680ec934beca02c7b1a61cf8ca34b66feab1" integrity sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q== -eslint-plugin-jest@26.1.4: - version "26.1.4" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-26.1.4.tgz#8e3410093ff4439d0c3a371add5bf9e05623a57a" - integrity sha512-wgqxujmqc2qpvZqMFWCh6Cniqc8lWpapvXt9j/19DmBDqeDaYhJrSRezYR1SKyemvjx+9e9kny/dgRahraHImA== +eslint-plugin-jest@26.1.5: + version "26.1.5" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-26.1.5.tgz#6cfca264818d6d6aa120b019dab4d62b6aa8e775" + integrity sha512-su89aDuljL9bTjEufTXmKUMSFe2kZUL9bi7+woq+C2ukHZordhtfPm4Vg+tdioHBaKf8v3/FXW9uV0ksqhYGFw== dependencies: "@typescript-eslint/utils" "^5.10.0" From 2a5af96eac8d1e3e74908c128b6f401cb60219b4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Apr 2022 22:03:02 -0400 Subject: [PATCH 6/6] Bump @types/node from 17.0.25 to 17.0.26 (#1089) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 17.0.25 to 17.0.26. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 1602f368b..7ab63c69e 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ }, "devDependencies": { "@types/jest": "27.4.1", - "@types/node": "17.0.25", + "@types/node": "17.0.26", "@typescript-eslint/eslint-plugin": "4.33.0", "@typescript-eslint/parser": "4.33.0", "eslint": "7.32.0", diff --git a/yarn.lock b/yarn.lock index 655e2f6f7..ae5e443ff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1271,10 +1271,10 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d" integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ== -"@types/node@*", "@types/node@17.0.25", "@types/node@>= 8": - version "17.0.25" - resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.25.tgz#527051f3c2f77aa52e5dc74e45a3da5fb2301448" - integrity sha512-wANk6fBrUwdpY4isjWrKTufkrXdu1D2YHCot2fD/DfWxF5sMrVSA+KN7ydckvaTCh0HiqX9IVl0L5/ZoXg5M7w== +"@types/node@*", "@types/node@17.0.26", "@types/node@>= 8": + version "17.0.26" + resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.26.tgz#1bbff9b23ee5a64f87b4f30c0c854b112ee2e635" + integrity sha512-z/FG/6DUO7pnze3AE3TBGIjGGKkvCcGcWINe1C7cADY8hKLJPDYpzsNE37uExQ4md5RFtTCvg+M8Mu1Enyeg2A== "@types/normalize-package-data@^2.4.0": version "2.4.0"