Merge branch 'dev' into releases/v4

This commit is contained in:
James Ives 2022-04-23 15:20:19 -04:00
commit c716b8fa65
12 changed files with 55 additions and 44 deletions

View File

@ -18,7 +18,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 'v14.18.1'
node-version: 'v16.13.2'
registry-url: 'https://registry.npmjs.org'
- name: Install Yarn
@ -31,7 +31,7 @@ jobs:
yarn test
- name: Uploade CodeCov Report
uses: codecov/codecov-action@v2.1.0
uses: codecov/codecov-action@v3.1.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
@ -43,7 +43,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 'v14.18.1'
node-version: 'v16.13.2'
registry-url: 'https://registry.npmjs.org'
- name: Install Yarn
@ -60,7 +60,7 @@ jobs:
ls node_modules
- name: artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: dist
path: |
@ -83,11 +83,11 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 'v14.18.1'
node-version: 'v16.13.2'
registry-url: 'https://registry.npmjs.org'
- name: Download artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: dist

View File

@ -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.2.5
uses: JamesIves/github-pages-deploy-action@v4.3.0
with:
branch: releases/v4
folder: .

View File

@ -17,13 +17,14 @@ on:
jobs:
# Deploys cross repo with an access token.
integration-cross-repo-push:
container: node:16.13
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build and Deploy
uses: JamesIves/github-pages-deploy-action@v4.3.0
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
git-config-name: Montezuma
git-config-email: montezuma@jamesiv.es
@ -44,7 +45,7 @@ jobs:
uses: actions/checkout@v3
- name: Build and Deploy
uses: JamesIves/github-pages-deploy-action@v4.3.0
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
token: ${{ secrets.ACCESS_TOKEN }}
branch: gh-pages
@ -71,7 +72,7 @@ jobs:
persist-credentials: false
- name: Build and Deploy
uses: JamesIves/github-pages-deploy-action@v4.3.0
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
branch: gh-pages
folder: integration
@ -103,7 +104,7 @@ jobs:
apt-get update && apt-get install -y rsync
- name: Build and Deploy
uses: JamesIves/github-pages-deploy-action@v4.3.0
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
branch: gh-pages
folder: integration
@ -127,7 +128,7 @@ jobs:
persist-credentials: false
- name: Build and Deploy
uses: JamesIves/github-pages-deploy-action@v4.3.0
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
ssh-key: ${{ secrets.DEPLOY_KEY }}
branch: gh-pages
@ -157,7 +158,7 @@ jobs:
ssh-private-key: ${{ secrets.DEPLOY_KEY }}
- name: Build and Deploy
uses: JamesIves/github-pages-deploy-action@v4.3.0
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
ssh-key: true
branch: gh-pages
@ -178,7 +179,7 @@ jobs:
steps:
- uses: actions/setup-node@v3
with:
node-version: 'v14.18.1'
node-version: 'v16.13.2'
- name: Checkout
uses: actions/checkout@v3
@ -186,7 +187,7 @@ jobs:
persist-credentials: false
- name: Build and Deploy
uses: JamesIves/github-pages-deploy-action@v4.3.0
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
ssh-key: ${{ secrets.DEPLOY_KEY }}
branch: gh-pages
@ -195,7 +196,7 @@ jobs:
silent: true
- name: Build and Deploy
uses: JamesIves/github-pages-deploy-action@v4.3.0
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
ssh-key: ${{ secrets.DEPLOY_KEY }}
branch: gh-pages
@ -228,7 +229,7 @@ jobs:
persist-credentials: false
- name: Build and Deploy
uses: JamesIves/github-pages-deploy-action@v4.3.0
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
token: ${{ secrets.ACCESS_TOKEN }}
branch: gh-pages
@ -247,7 +248,7 @@ jobs:
persist-credentials: false
- name: Build and Deploy
uses: JamesIves/github-pages-deploy-action@v4.3.0
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
token: ${{ secrets.ACCESS_TOKEN }}
branch: integration-test-delete-prod
@ -256,7 +257,7 @@ jobs:
silent: true
- name: Build and Deploy
uses: JamesIves/github-pages-deploy-action@v4.3.0
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
token: ${{ secrets.ACCESS_TOKEN }}
branch: integration-test-delete-prod
@ -284,7 +285,7 @@ jobs:
run: echo $RANDOM > integration/1
- name: Build and Deploy
uses: JamesIves/github-pages-deploy-action@v4.3.0
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
git-config-name: Montezuma
git-config-email: montezuma@jamesiv.es
@ -296,7 +297,7 @@ jobs:
# Second conflicting deployment
integration-rebase-conflicts-2:
needs: integration-branch-creation
needs: integration-rebase-conflicts-1
runs-on: ubuntu-latest
steps:
- name: Checkout
@ -306,7 +307,7 @@ jobs:
run: echo $RANDOM > integration/2
- name: Build and Deploy
uses: JamesIves/github-pages-deploy-action@v4.3.0
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
git-config-name: Montezuma
git-config-email: montezuma@jamesiv.es

View File

@ -17,7 +17,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 'v14.18.1'
node-version: 'v16.13.2'
registry-url: 'https://registry.npmjs.org'
- name: Install Yarn

View File

@ -17,7 +17,7 @@ jobs:
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: 'v14.18.1'
node-version: 'v16.13.2'
registry-url: 'https://registry.npmjs.org'
scope: '@jamesives'
@ -43,7 +43,7 @@ jobs:
# Setup .npmrc file to publish to GitHub Packages
- uses: actions/setup-node@v3
with:
node-version: 'v14.18.1'
node-version: 'v16.13.2'
registry-url: 'https://npm.pkg.github.com'
scope: '@jamesives'

View File

@ -29,7 +29,7 @@ jobs:
marker: 'premium'
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4.2.5
uses: JamesIves/github-pages-deploy-action@v4.3.0
with:
branch: dev
folder: '.'

2
.nvmrc
View File

@ -1 +1 @@
v14.18.1
v16.13.2

View File

@ -55,7 +55,7 @@ describe('git', () => {
})
await init(action)
expect(execute).toBeCalledTimes(6)
expect(execute).toBeCalledTimes(7)
})
it('should catch when a function throws an error', async () => {
@ -102,7 +102,7 @@ describe('git', () => {
})
await init(action)
expect(execute).toBeCalledTimes(6)
expect(execute).toBeCalledTimes(7)
})
it('should not unset git config if a user is using ssh', async () => {
@ -124,7 +124,7 @@ describe('git', () => {
})
await init(action)
expect(execute).toBeCalledTimes(5)
expect(execute).toBeCalledTimes(6)
process.env.CI = undefined
})
@ -145,7 +145,7 @@ describe('git', () => {
})
await init(action)
expect(execute).toBeCalledTimes(6)
expect(execute).toBeCalledTimes(7)
})
})

View File

@ -53,7 +53,7 @@ describe('main', () => {
debug: true
})
await run(action)
expect(execute).toBeCalledTimes(16)
expect(execute).toBeCalledTimes(17)
expect(rmRF).toBeCalledTimes(1)
expect(exportVariable).toBeCalledTimes(1)
})
@ -73,7 +73,7 @@ describe('main', () => {
isTest: TestFlag.HAS_CHANGED_FILES
})
await run(action)
expect(execute).toBeCalledTimes(19)
expect(execute).toBeCalledTimes(20)
expect(rmRF).toBeCalledTimes(1)
expect(exportVariable).toBeCalledTimes(1)
})

View File

@ -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 <iam@jamesiv.es> (https://jamesiv.es)",
"version": "4.2.5",
"version": "4.3.0",
"license": "MIT",
"main": "lib/lib.js",
"types": "lib/lib.d.ts",
@ -40,12 +40,12 @@
},
"devDependencies": {
"@types/jest": "27.4.1",
"@types/node": "17.0.23",
"@types/node": "17.0.25",
"@typescript-eslint/eslint-plugin": "4.33.0",
"@typescript-eslint/parser": "4.33.0",
"eslint": "7.32.0",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-jest": "26.1.3",
"eslint-plugin-jest": "26.1.4",
"eslint-plugin-prettier": "4.0.0",
"jest": "26.6.3",
"jest-circus": "27.5.1",

View File

@ -21,6 +21,16 @@ export async function init(action: ActionInterface): Promise<void | Error> {
info(`Deploying using ${action.tokenType}… 🔑`)
info('Configuring git…')
try {
await execute(
`git config --global --add safe.directory "${action.workspace}"`,
action.workspace,
action.silent
)
} catch {
info('Unable to set workspace as a safe directory…')
}
await execute(
`git config user.name "${action.name}"`,
action.workspace,

View File

@ -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.23", "@types/node@>= 8":
version "17.0.23"
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.23.tgz#3b41a6e643589ac6442bdbd7a4a3ded62f33f7da"
integrity sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw==
"@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/normalize-package-data@^2.4.0":
version "2.4.0"
@ -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.3:
version "26.1.3"
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-26.1.3.tgz#e722e5efeea18aa9dec7c7349987b641db19feb7"
integrity sha512-Pju+T7MFpo5VFhFlwrkK/9jRUu18r2iugvgyrWOnnGRaVTFFmFXp+xFJpHyqmjjLmGJPKLeEFLVTAxezkApcpQ==
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==
dependencies:
"@typescript-eslint/utils" "^5.10.0"