Skip to content

Commit d5dce9b

Browse files
committed
Merge branch 'dev' into releases/v4
2 parents dc18a3c + 389b85f commit d5dce9b

File tree

4 files changed

+122
-20
lines changed

4 files changed

+122
-20
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@jamesives/github-pages-deploy-action",
33
"description": "GitHub action for building a project and deploying it to GitHub pages.",
44
"author": "James Ives <[email protected]> (https://jamesiv.es)",
5-
"version": "4.7.0",
5+
"version": "4.7.1",
66
"license": "MIT",
77
"main": "lib/lib.js",
88
"types": "lib/lib.d.ts",
@@ -47,7 +47,7 @@
4747
"@types/node": "22.10.1",
4848
"@typescript-eslint/eslint-plugin": "8.16.0",
4949
"@typescript-eslint/parser": "8.16.0",
50-
"eslint": "9.15.0",
50+
"eslint": "9.16.0",
5151
"eslint-config-prettier": "9.1.0",
5252
"eslint-plugin-jest": "28.9.0",
5353
"eslint-plugin-prettier": "5.2.1",

src/git.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ import {generateWorktree} from './worktree'
1212
import {
1313
extractErrorMessage,
1414
isNullOrUndefined,
15-
suppressSensitiveInformation
15+
suppressSensitiveInformation,
16+
getRsyncVersion
1617
} from './util'
1718

1819
/**
@@ -110,6 +111,8 @@ export async function deploy(action: ActionInterface): Promise<Status> {
110111
const temporaryDeploymentBranch = `github-pages-deploy-action/${Math.random()
111112
.toString(36)
112113
.substr(2, 9)}`
114+
const rsyncVersion = getRsyncVersion()
115+
const isMkpathSupported = rsyncVersion >= '3.2.3'
113116

114117
info('Starting to commit changes…')
115118

@@ -166,7 +169,7 @@ export async function deploy(action: ActionInterface): Promise<Status> {
166169
Allows the user to specify the root if '.' is provided.
167170
rsync is used to prevent file duplication. */
168171
await execute(
169-
`rsync -q -av --checksum --progress ${action.targetFolder ? '--mkpath' : ''} ${action.folderPath}/. ${
172+
`rsync -q -av --checksum --progress ${isMkpathSupported && action.targetFolder ? '--mkpath' : ''} ${action.folderPath}/. ${
170173
action.targetFolder
171174
? `${temporaryDeploymentDirectory}/${action.targetFolder}`
172175
: temporaryDeploymentDirectory

src/util.ts

+18
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import {isDebug, warning} from '@actions/core'
2+
import {execSync} from 'child_process'
23
import {existsSync} from 'fs'
34
import path from 'path'
45
import {
@@ -140,3 +141,20 @@ export const extractErrorMessage = (error: unknown): string =>
140141
*/
141142
export const stripProtocolFromUrl = (url: string): string =>
142143
url.replace(/^(?:https?:\/\/)?(?:www\.)?/i, '').split('/')[0]
144+
145+
/**
146+
* Gets the rsync version.
147+
*/
148+
export function getRsyncVersion(): string {
149+
try {
150+
const versionOutput = execSync('rsync --version').toString()
151+
const versionMatch = versionOutput.match(
152+
/rsync\s+version\s+(\d+\.\d+\.\d+)/
153+
)
154+
return versionMatch ? versionMatch[1] : ''
155+
} catch (error) {
156+
console.error(error)
157+
158+
return ''
159+
}
160+
}

yarn.lock

+97-16
Original file line numberDiff line numberDiff line change
@@ -667,10 +667,10 @@
667667
minimatch "^3.1.2"
668668
strip-json-comments "^3.1.1"
669669

670-
"@eslint/js@9.15.0", "@eslint/js@^9.0.0":
671-
version "9.15.0"
672-
resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.15.0.tgz#df0e24fe869143b59731942128c19938fdbadfb5"
673-
integrity sha512-tMTqrY+EzbXmKJR5ToI8lxu7jaN5EdmrBFJpQk5JmSlyLsx6o4t27r883K5xsLuCYCpfKBCGswMSWXsM+jB7lg==
670+
"@eslint/js@9.16.0", "@eslint/js@^9.0.0":
671+
version "9.16.0"
672+
resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.16.0.tgz#3df2b2dd3b9163056616886c86e4082f45dbf3f4"
673+
integrity sha512-tw2HxzQkrbeuvyj1tG2Yqq+0H9wGoI2IMk4EOsQeX+vmd75FtJAzf+gTA69WF+baUKRYQ3x2kbLE08js5OsTVg==
674674

675675
"@eslint/object-schema@^2.1.4":
676676
version "2.1.4"
@@ -1251,6 +1251,21 @@
12511251
natural-compare "^1.4.0"
12521252
ts-api-utils "^1.3.0"
12531253

1254+
"@typescript-eslint/[email protected]":
1255+
version "8.17.0"
1256+
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.17.0.tgz#2ee073c421f4e81e02d10e731241664b6253b23c"
1257+
integrity sha512-HU1KAdW3Tt8zQkdvNoIijfWDMvdSweFYm4hWh+KwhPstv+sCmWb89hCIP8msFm9N1R/ooh9honpSuvqKWlYy3w==
1258+
dependencies:
1259+
"@eslint-community/regexpp" "^4.10.0"
1260+
"@typescript-eslint/scope-manager" "8.17.0"
1261+
"@typescript-eslint/type-utils" "8.17.0"
1262+
"@typescript-eslint/utils" "8.17.0"
1263+
"@typescript-eslint/visitor-keys" "8.17.0"
1264+
graphemer "^1.4.0"
1265+
ignore "^5.3.1"
1266+
natural-compare "^1.4.0"
1267+
ts-api-utils "^1.3.0"
1268+
12541269
"@typescript-eslint/[email protected]":
12551270
version "8.16.0"
12561271
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.16.0.tgz#ee5b2d6241c1ab3e2e53f03fd5a32d8e266d8e06"
@@ -1262,6 +1277,17 @@
12621277
"@typescript-eslint/visitor-keys" "8.16.0"
12631278
debug "^4.3.4"
12641279

1280+
"@typescript-eslint/[email protected]":
1281+
version "8.17.0"
1282+
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.17.0.tgz#2ee972bb12fa69ac625b85813dc8d9a5a053ff52"
1283+
integrity sha512-Drp39TXuUlD49F7ilHHCG7TTg8IkA+hxCuULdmzWYICxGXvDXmDmWEjJYZQYgf6l/TFfYNE167m7isnc3xlIEg==
1284+
dependencies:
1285+
"@typescript-eslint/scope-manager" "8.17.0"
1286+
"@typescript-eslint/types" "8.17.0"
1287+
"@typescript-eslint/typescript-estree" "8.17.0"
1288+
"@typescript-eslint/visitor-keys" "8.17.0"
1289+
debug "^4.3.4"
1290+
12651291
"@typescript-eslint/[email protected]":
12661292
version "8.16.0"
12671293
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.16.0.tgz#ebc9a3b399a69a6052f3d88174456dd399ef5905"
@@ -1270,6 +1296,14 @@
12701296
"@typescript-eslint/types" "8.16.0"
12711297
"@typescript-eslint/visitor-keys" "8.16.0"
12721298

1299+
"@typescript-eslint/[email protected]":
1300+
version "8.17.0"
1301+
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.17.0.tgz#a3f49bf3d4d27ff8d6b2ea099ba465ef4dbcaa3a"
1302+
integrity sha512-/ewp4XjvnxaREtqsZjF4Mfn078RD/9GmiEAtTeLQ7yFdKnqwTOgRMSvFz4et9U5RiJQ15WTGXPLj89zGusvxBg==
1303+
dependencies:
1304+
"@typescript-eslint/types" "8.17.0"
1305+
"@typescript-eslint/visitor-keys" "8.17.0"
1306+
12731307
"@typescript-eslint/[email protected]":
12741308
version "8.16.0"
12751309
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.16.0.tgz#585388735f7ac390f07c885845c3d185d1b64740"
@@ -1280,11 +1314,26 @@
12801314
debug "^4.3.4"
12811315
ts-api-utils "^1.3.0"
12821316

1317+
"@typescript-eslint/[email protected]":
1318+
version "8.17.0"
1319+
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.17.0.tgz#d326569f498cdd0edf58d5bb6030b4ad914e63d3"
1320+
integrity sha512-q38llWJYPd63rRnJ6wY/ZQqIzPrBCkPdpIsaCfkR3Q4t3p6sb422zougfad4TFW9+ElIFLVDzWGiGAfbb/v2qw==
1321+
dependencies:
1322+
"@typescript-eslint/typescript-estree" "8.17.0"
1323+
"@typescript-eslint/utils" "8.17.0"
1324+
debug "^4.3.4"
1325+
ts-api-utils "^1.3.0"
1326+
12831327
"@typescript-eslint/[email protected]":
12841328
version "8.16.0"
12851329
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.16.0.tgz#49c92ae1b57942458ab83d9ec7ccab3005e64737"
12861330
integrity sha512-NzrHj6thBAOSE4d9bsuRNMvk+BvaQvmY4dDglgkgGC0EW/tB3Kelnp3tAKH87GEwzoxgeQn9fNGRyFJM/xd+GQ==
12871331

1332+
"@typescript-eslint/[email protected]":
1333+
version "8.17.0"
1334+
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.17.0.tgz#ef84c709ef8324e766878834970bea9a7e3b72cf"
1335+
integrity sha512-gY2TVzeve3z6crqh2Ic7Cr+CAv6pfb0Egee7J5UAVWCpVvDI/F71wNfolIim4FE6hT15EbpZFVUj9j5i38jYXA==
1336+
12881337
"@typescript-eslint/[email protected]":
12891338
version "8.16.0"
12901339
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.16.0.tgz#9d741e56e5b13469b5190e763432ce5551a9300c"
@@ -1299,7 +1348,21 @@
12991348
semver "^7.6.0"
13001349
ts-api-utils "^1.3.0"
13011350

1302-
"@typescript-eslint/[email protected]", "@typescript-eslint/utils@^6.0.0 || ^7.0.0 || ^8.0.0":
1351+
"@typescript-eslint/[email protected]":
1352+
version "8.17.0"
1353+
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.17.0.tgz#40b5903bc929b1e8dd9c77db3cb52cfb199a2a34"
1354+
integrity sha512-JqkOopc1nRKZpX+opvKqnM3XUlM7LpFMD0lYxTqOTKQfCWAmxw45e3qlOCsEqEB2yuacujivudOFpCnqkBDNMw==
1355+
dependencies:
1356+
"@typescript-eslint/types" "8.17.0"
1357+
"@typescript-eslint/visitor-keys" "8.17.0"
1358+
debug "^4.3.4"
1359+
fast-glob "^3.3.2"
1360+
is-glob "^4.0.3"
1361+
minimatch "^9.0.4"
1362+
semver "^7.6.0"
1363+
ts-api-utils "^1.3.0"
1364+
1365+
"@typescript-eslint/[email protected]":
13031366
version "8.16.0"
13041367
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.16.0.tgz#c71264c437157feaa97842809836254a6fc833c3"
13051368
integrity sha512-C1zRy/mOL8Pj157GiX4kaw7iyRLKfJXBR3L82hk5kS/GyHcOFmy4YUq/zfZti72I9wnuQtA/+xzft4wCC8PJdA==
@@ -1309,6 +1372,16 @@
13091372
"@typescript-eslint/types" "8.16.0"
13101373
"@typescript-eslint/typescript-estree" "8.16.0"
13111374

1375+
"@typescript-eslint/[email protected]", "@typescript-eslint/utils@^6.0.0 || ^7.0.0 || ^8.0.0":
1376+
version "8.17.0"
1377+
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.17.0.tgz#41c05105a2b6ab7592f513d2eeb2c2c0236d8908"
1378+
integrity sha512-bQC8BnEkxqG8HBGKwG9wXlZqg37RKSMY7v/X8VEWD8JG2JuTHuNK0VFvMPMUKQcbk6B+tf05k+4AShAEtCtJ/w==
1379+
dependencies:
1380+
"@eslint-community/eslint-utils" "^4.4.0"
1381+
"@typescript-eslint/scope-manager" "8.17.0"
1382+
"@typescript-eslint/types" "8.17.0"
1383+
"@typescript-eslint/typescript-estree" "8.17.0"
1384+
13121385
"@typescript-eslint/[email protected]":
13131386
version "8.16.0"
13141387
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.16.0.tgz#d5086afc060b01ff7a4ecab8d49d13d5a7b07705"
@@ -1317,6 +1390,14 @@
13171390
"@typescript-eslint/types" "8.16.0"
13181391
eslint-visitor-keys "^4.2.0"
13191392

1393+
"@typescript-eslint/[email protected]":
1394+
version "8.17.0"
1395+
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.17.0.tgz#4dbcd0e28b9bf951f4293805bf34f98df45e1aa8"
1396+
integrity sha512-1Hm7THLpO6ww5QU6H/Qp+AusUUl+z/CAm3cNZZ0jQvon9yicgO7Rwd+/WWRpMKLYV6p2UvdbR27c86rzCPpreg==
1397+
dependencies:
1398+
"@typescript-eslint/types" "8.17.0"
1399+
eslint-visitor-keys "^4.2.0"
1400+
13201401
acorn-jsx@^5.3.2:
13211402
version "5.3.2"
13221403
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937"
@@ -1786,17 +1867,17 @@ eslint-visitor-keys@^4.2.0:
17861867
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz#687bacb2af884fcdda8a6e7d65c606f46a14cd45"
17871868
integrity sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==
17881869

1789-
eslint@9.15.0:
1790-
version "9.15.0"
1791-
resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.15.0.tgz#77c684a4e980e82135ebff8ee8f0a9106ce6b8a6"
1792-
integrity sha512-7CrWySmIibCgT1Os28lUU6upBshZ+GxybLOrmRzi08kS8MBuO8QA7pXEgYgY5W8vK3e74xv0lpjo9DbaGU9Rkw==
1870+
eslint@9.16.0:
1871+
version "9.16.0"
1872+
resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.16.0.tgz#66832e66258922ac0a626f803a9273e37747f2a6"
1873+
integrity sha512-whp8mSQI4C8VXd+fLgSM0lh3UlmcFtVwUQjyKCFfsp+2ItAIYhlq/hqGahGqHE6cv9unM41VlqKk2VtKYR2TaA==
17931874
dependencies:
17941875
"@eslint-community/eslint-utils" "^4.2.0"
17951876
"@eslint-community/regexpp" "^4.12.1"
17961877
"@eslint/config-array" "^0.19.0"
17971878
"@eslint/core" "^0.9.0"
17981879
"@eslint/eslintrc" "^3.2.0"
1799-
"@eslint/js" "9.15.0"
1880+
"@eslint/js" "9.16.0"
18001881
"@eslint/plugin-kit" "^0.2.3"
18011882
"@humanfs/node" "^0.16.6"
18021883
"@humanwhocodes/module-importer" "^1.0.1"
@@ -3290,13 +3371,13 @@ type-fest@^0.8.1:
32903371
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d"
32913372

32923373
typescript-eslint@^8.13.0:
3293-
version "8.16.0"
3294-
resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-8.16.0.tgz#d608c972d6b2461ca10ec30fd3fa62a080baba19"
3295-
integrity sha512-wDkVmlY6O2do4V+lZd0GtRfbtXbeD0q9WygwXXSJnC1xorE8eqyC2L1tJimqpSeFrOzRlYtWnUp/uzgHQOgfBQ==
3374+
version "8.17.0"
3375+
resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-8.17.0.tgz#fa4033c26b3b40f778287bc12918d985481b220b"
3376+
integrity sha512-409VXvFd/f1br1DCbuKNFqQpXICoTB+V51afcwG1pn1a3Cp92MqAUges3YjwEdQ0cMUoCIodjVDAYzyD8h3SYA==
32963377
dependencies:
3297-
"@typescript-eslint/eslint-plugin" "8.16.0"
3298-
"@typescript-eslint/parser" "8.16.0"
3299-
"@typescript-eslint/utils" "8.16.0"
3378+
"@typescript-eslint/eslint-plugin" "8.17.0"
3379+
"@typescript-eslint/parser" "8.17.0"
3380+
"@typescript-eslint/utils" "8.17.0"
33003381

33013382
33023383
version "5.7.2"

0 commit comments

Comments
 (0)