Skip to content

Commit c716b8f

Browse files
committed
Merge branch 'dev' into releases/v4
2 parents 8f2725f + 1506a6c commit c716b8f

File tree

12 files changed

+55
-44
lines changed

12 files changed

+55
-44
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
- uses: actions/setup-node@v3
2020
with:
21-
node-version: 'v14.18.1'
21+
node-version: 'v16.13.2'
2222
registry-url: 'https://registry.npmjs.org'
2323

2424
- name: Install Yarn
@@ -31,7 +31,7 @@ jobs:
3131
yarn test
3232
3333
- name: Uploade CodeCov Report
34-
uses: codecov/codecov-action@v2.1.0
34+
uses: codecov/codecov-action@v3.1.0
3535
with:
3636
token: ${{ secrets.CODECOV_TOKEN }}
3737

@@ -43,7 +43,7 @@ jobs:
4343

4444
- uses: actions/setup-node@v3
4545
with:
46-
node-version: 'v14.18.1'
46+
node-version: 'v16.13.2'
4747
registry-url: 'https://registry.npmjs.org'
4848

4949
- name: Install Yarn
@@ -60,7 +60,7 @@ jobs:
6060
ls node_modules
6161
6262
- name: artifact
63-
uses: actions/upload-artifact@v2
63+
uses: actions/upload-artifact@v3
6464
with:
6565
name: dist
6666
path: |
@@ -83,11 +83,11 @@ jobs:
8383

8484
- uses: actions/setup-node@v3
8585
with:
86-
node-version: 'v14.18.1'
86+
node-version: 'v16.13.2'
8787
registry-url: 'https://registry.npmjs.org'
8888

8989
- name: Download artifact
90-
uses: actions/download-artifact@v2
90+
uses: actions/download-artifact@v3
9191
with:
9292
name: dist
9393

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
# Workflow dispatch event that pushes the current version to the release branch.
1414
# From here the secondary production deployment workflow will trigger to build the dependencies.
1515
- name: Deploy 🚀
16-
uses: JamesIves/github-pages-deploy-action@v4.2.5
16+
uses: JamesIves/github-pages-deploy-action@v4.3.0
1717
with:
1818
branch: releases/v4
1919
folder: .

.github/workflows/integration.yml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@ on:
1717
jobs:
1818
# Deploys cross repo with an access token.
1919
integration-cross-repo-push:
20+
container: node:16.13
2021
runs-on: ubuntu-latest
2122
steps:
2223
- name: Checkout
2324
uses: actions/checkout@v3
2425

2526
- name: Build and Deploy
26-
uses: JamesIves/github-pages-deploy-action@v4.3.0
27+
uses: JamesIves/github-pages-deploy-action@releases/v4
2728
with:
2829
git-config-name: Montezuma
2930
git-config-email: [email protected]
@@ -44,7 +45,7 @@ jobs:
4445
uses: actions/checkout@v3
4546

4647
- name: Build and Deploy
47-
uses: JamesIves/github-pages-deploy-action@v4.3.0
48+
uses: JamesIves/github-pages-deploy-action@releases/v4
4849
with:
4950
token: ${{ secrets.ACCESS_TOKEN }}
5051
branch: gh-pages
@@ -71,7 +72,7 @@ jobs:
7172
persist-credentials: false
7273

7374
- name: Build and Deploy
74-
uses: JamesIves/github-pages-deploy-action@v4.3.0
75+
uses: JamesIves/github-pages-deploy-action@releases/v4
7576
with:
7677
branch: gh-pages
7778
folder: integration
@@ -103,7 +104,7 @@ jobs:
103104
apt-get update && apt-get install -y rsync
104105
105106
- name: Build and Deploy
106-
uses: JamesIves/github-pages-deploy-action@v4.3.0
107+
uses: JamesIves/github-pages-deploy-action@releases/v4
107108
with:
108109
branch: gh-pages
109110
folder: integration
@@ -127,7 +128,7 @@ jobs:
127128
persist-credentials: false
128129

129130
- name: Build and Deploy
130-
uses: JamesIves/github-pages-deploy-action@v4.3.0
131+
uses: JamesIves/github-pages-deploy-action@releases/v4
131132
with:
132133
ssh-key: ${{ secrets.DEPLOY_KEY }}
133134
branch: gh-pages
@@ -157,7 +158,7 @@ jobs:
157158
ssh-private-key: ${{ secrets.DEPLOY_KEY }}
158159

159160
- name: Build and Deploy
160-
uses: JamesIves/github-pages-deploy-action@v4.3.0
161+
uses: JamesIves/github-pages-deploy-action@releases/v4
161162
with:
162163
ssh-key: true
163164
branch: gh-pages
@@ -178,15 +179,15 @@ jobs:
178179
steps:
179180
- uses: actions/setup-node@v3
180181
with:
181-
node-version: 'v14.18.1'
182+
node-version: 'v16.13.2'
182183

183184
- name: Checkout
184185
uses: actions/checkout@v3
185186
with:
186187
persist-credentials: false
187188

188189
- name: Build and Deploy
189-
uses: JamesIves/github-pages-deploy-action@v4.3.0
190+
uses: JamesIves/github-pages-deploy-action@releases/v4
190191
with:
191192
ssh-key: ${{ secrets.DEPLOY_KEY }}
192193
branch: gh-pages
@@ -195,7 +196,7 @@ jobs:
195196
silent: true
196197

197198
- name: Build and Deploy
198-
uses: JamesIves/github-pages-deploy-action@v4.3.0
199+
uses: JamesIves/github-pages-deploy-action@releases/v4
199200
with:
200201
ssh-key: ${{ secrets.DEPLOY_KEY }}
201202
branch: gh-pages
@@ -228,7 +229,7 @@ jobs:
228229
persist-credentials: false
229230

230231
- name: Build and Deploy
231-
uses: JamesIves/github-pages-deploy-action@v4.3.0
232+
uses: JamesIves/github-pages-deploy-action@releases/v4
232233
with:
233234
token: ${{ secrets.ACCESS_TOKEN }}
234235
branch: gh-pages
@@ -247,7 +248,7 @@ jobs:
247248
persist-credentials: false
248249

249250
- name: Build and Deploy
250-
uses: JamesIves/github-pages-deploy-action@v4.3.0
251+
uses: JamesIves/github-pages-deploy-action@releases/v4
251252
with:
252253
token: ${{ secrets.ACCESS_TOKEN }}
253254
branch: integration-test-delete-prod
@@ -256,7 +257,7 @@ jobs:
256257
silent: true
257258

258259
- name: Build and Deploy
259-
uses: JamesIves/github-pages-deploy-action@v4.3.0
260+
uses: JamesIves/github-pages-deploy-action@releases/v4
260261
with:
261262
token: ${{ secrets.ACCESS_TOKEN }}
262263
branch: integration-test-delete-prod
@@ -284,7 +285,7 @@ jobs:
284285
run: echo $RANDOM > integration/1
285286

286287
- name: Build and Deploy
287-
uses: JamesIves/github-pages-deploy-action@v4.3.0
288+
uses: JamesIves/github-pages-deploy-action@releases/v4
288289
with:
289290
git-config-name: Montezuma
290291
git-config-email: [email protected]
@@ -296,7 +297,7 @@ jobs:
296297

297298
# Second conflicting deployment
298299
integration-rebase-conflicts-2:
299-
needs: integration-branch-creation
300+
needs: integration-rebase-conflicts-1
300301
runs-on: ubuntu-latest
301302
steps:
302303
- name: Checkout
@@ -306,7 +307,7 @@ jobs:
306307
run: echo $RANDOM > integration/2
307308

308309
- name: Build and Deploy
309-
uses: JamesIves/github-pages-deploy-action@v4.3.0
310+
uses: JamesIves/github-pages-deploy-action@releases/v4
310311
with:
311312
git-config-name: Montezuma
312313
git-config-email: [email protected]

.github/workflows/production.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
- uses: actions/setup-node@v3
1919
with:
20-
node-version: 'v14.18.1'
20+
node-version: 'v16.13.2'
2121
registry-url: 'https://registry.npmjs.org'
2222

2323
- name: Install Yarn

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
# Setup .npmrc file to publish to npm
1818
- uses: actions/setup-node@v3
1919
with:
20-
node-version: 'v14.18.1'
20+
node-version: 'v16.13.2'
2121
registry-url: 'https://registry.npmjs.org'
2222
scope: '@jamesives'
2323

@@ -43,7 +43,7 @@ jobs:
4343
# Setup .npmrc file to publish to GitHub Packages
4444
- uses: actions/setup-node@v3
4545
with:
46-
node-version: 'v14.18.1'
46+
node-version: 'v16.13.2'
4747
registry-url: 'https://npm.pkg.github.com'
4848
scope: '@jamesives'
4949

.github/workflows/sponsors.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
marker: 'premium'
3030

3131
- name: Deploy to GitHub Pages
32-
uses: JamesIves/github-pages-deploy-action@v4.2.5
32+
uses: JamesIves/github-pages-deploy-action@v4.3.0
3333
with:
3434
branch: dev
3535
folder: '.'

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v14.18.1
1+
v16.13.2

__tests__/git.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ describe('git', () => {
5555
})
5656

5757
await init(action)
58-
expect(execute).toBeCalledTimes(6)
58+
expect(execute).toBeCalledTimes(7)
5959
})
6060

6161
it('should catch when a function throws an error', async () => {
@@ -102,7 +102,7 @@ describe('git', () => {
102102
})
103103

104104
await init(action)
105-
expect(execute).toBeCalledTimes(6)
105+
expect(execute).toBeCalledTimes(7)
106106
})
107107

108108
it('should not unset git config if a user is using ssh', async () => {
@@ -124,7 +124,7 @@ describe('git', () => {
124124
})
125125

126126
await init(action)
127-
expect(execute).toBeCalledTimes(5)
127+
expect(execute).toBeCalledTimes(6)
128128

129129
process.env.CI = undefined
130130
})
@@ -145,7 +145,7 @@ describe('git', () => {
145145
})
146146

147147
await init(action)
148-
expect(execute).toBeCalledTimes(6)
148+
expect(execute).toBeCalledTimes(7)
149149
})
150150
})
151151

__tests__/main.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ describe('main', () => {
5353
debug: true
5454
})
5555
await run(action)
56-
expect(execute).toBeCalledTimes(16)
56+
expect(execute).toBeCalledTimes(17)
5757
expect(rmRF).toBeCalledTimes(1)
5858
expect(exportVariable).toBeCalledTimes(1)
5959
})
@@ -73,7 +73,7 @@ describe('main', () => {
7373
isTest: TestFlag.HAS_CHANGED_FILES
7474
})
7575
await run(action)
76-
expect(execute).toBeCalledTimes(19)
76+
expect(execute).toBeCalledTimes(20)
7777
expect(rmRF).toBeCalledTimes(1)
7878
expect(exportVariable).toBeCalledTimes(1)
7979
})

package.json

Lines changed: 3 additions & 3 deletions
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.2.5",
5+
"version": "4.3.0",
66
"license": "MIT",
77
"main": "lib/lib.js",
88
"types": "lib/lib.d.ts",
@@ -40,12 +40,12 @@
4040
},
4141
"devDependencies": {
4242
"@types/jest": "27.4.1",
43-
"@types/node": "17.0.23",
43+
"@types/node": "17.0.25",
4444
"@typescript-eslint/eslint-plugin": "4.33.0",
4545
"@typescript-eslint/parser": "4.33.0",
4646
"eslint": "7.32.0",
4747
"eslint-config-prettier": "8.5.0",
48-
"eslint-plugin-jest": "26.1.3",
48+
"eslint-plugin-jest": "26.1.4",
4949
"eslint-plugin-prettier": "4.0.0",
5050
"jest": "26.6.3",
5151
"jest-circus": "27.5.1",

src/git.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@ export async function init(action: ActionInterface): Promise<void | Error> {
2121
info(`Deploying using ${action.tokenType}… 🔑`)
2222
info('Configuring git…')
2323

24+
try {
25+
await execute(
26+
`git config --global --add safe.directory "${action.workspace}"`,
27+
action.workspace,
28+
action.silent
29+
)
30+
} catch {
31+
info('Unable to set workspace as a safe directory…')
32+
}
33+
2434
await execute(
2535
`git config user.name "${action.name}"`,
2636
action.workspace,

yarn.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,10 +1271,10 @@
12711271
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d"
12721272
integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==
12731273

1274-
"@types/node@*", "@types/[email protected].23", "@types/node@>= 8":
1275-
version "17.0.23"
1276-
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.23.tgz#3b41a6e643589ac6442bdbd7a4a3ded62f33f7da"
1277-
integrity sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw==
1274+
"@types/node@*", "@types/[email protected].25", "@types/node@>= 8":
1275+
version "17.0.25"
1276+
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.25.tgz#527051f3c2f77aa52e5dc74e45a3da5fb2301448"
1277+
integrity sha512-wANk6fBrUwdpY4isjWrKTufkrXdu1D2YHCot2fD/DfWxF5sMrVSA+KN7ydckvaTCh0HiqX9IVl0L5/ZoXg5M7w==
12781278

12791279
"@types/normalize-package-data@^2.4.0":
12801280
version "2.4.0"
@@ -2150,10 +2150,10 @@ [email protected]:
21502150
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz#5a81680ec934beca02c7b1a61cf8ca34b66feab1"
21512151
integrity sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==
21522152

2153-
2154-
version "26.1.3"
2155-
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-26.1.3.tgz#e722e5efeea18aa9dec7c7349987b641db19feb7"
2156-
integrity sha512-Pju+T7MFpo5VFhFlwrkK/9jRUu18r2iugvgyrWOnnGRaVTFFmFXp+xFJpHyqmjjLmGJPKLeEFLVTAxezkApcpQ==
2153+
2154+
version "26.1.4"
2155+
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-26.1.4.tgz#8e3410093ff4439d0c3a371add5bf9e05623a57a"
2156+
integrity sha512-wgqxujmqc2qpvZqMFWCh6Cniqc8lWpapvXt9j/19DmBDqeDaYhJrSRezYR1SKyemvjx+9e9kny/dgRahraHImA==
21572157
dependencies:
21582158
"@typescript-eslint/utils" "^5.10.0"
21592159

0 commit comments

Comments
 (0)