From 9fb02c43c1fb472c64235f1750cec76f929da1e5 Mon Sep 17 00:00:00 2001 From: James Ives Date: Sat, 6 Jun 2020 15:21:17 +0000 Subject: [PATCH 1/3] =?UTF-8?q?Release=203.5.4=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 7a688630..b8740536 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": "3.5.3", + "version": "3.5.4", "license": "MIT", "main": "lib/lib.js", "types": "lib/lib.d.ts", From a108ee7921fea5156c4b25d42017c6ceb43237a0 Mon Sep 17 00:00:00 2001 From: James Ives Date: Sat, 6 Jun 2020 12:43:20 -0400 Subject: [PATCH 2/3] Update integration.yml --- .github/workflows/integration.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index c2980d22..6eec93f8 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -178,6 +178,7 @@ jobs: # Deploys to a branch that doesn't exist with SINGLE_COMMIT. integration-branch-creation: + needs: integration-clean runs-on: ubuntu-latest steps: - name: Checkout From 5e3a0374ac43c200e850cfcffb5e16f80bcccf3d Mon Sep 17 00:00:00 2001 From: James Ives Date: Sat, 6 Jun 2020 13:49:39 -0400 Subject: [PATCH 3/3] Rollback folder check --- __tests__/git.test.ts | 23 ----------------------- src/util.ts | 7 ------- 2 files changed, 30 deletions(-) diff --git a/__tests__/git.test.ts b/__tests__/git.test.ts index c74fbd82..87381633 100644 --- a/__tests__/git.test.ts +++ b/__tests__/git.test.ts @@ -146,29 +146,6 @@ describe('git', () => { } }) - it('should fail if the folder does not exist in the tree', async () => { - Object.assign(action, { - repositoryPath: 'JamesIves/github-pages-deploy-action', - gitHubToken: '123', - branch: 'branch', - pusher: { - name: 'asd', - email: 'as@cat' - }, - folder: 'notARealFolder', - ssh: true - }) - - try { - await init(action) - } catch (e) { - expect(execute).toBeCalledTimes(0) - expect(e.message).toMatch( - `There was an error initializing the repository: The notARealFolder directory you're trying to deploy doesn't exist. ❗ ❌` - ) - } - }) - it('should fail if there is no provided repository path', async () => { Object.assign(action, { repositoryPath: null, diff --git a/src/util.ts b/src/util.ts index e0ab5c49..735f6f5a 100644 --- a/src/util.ts +++ b/src/util.ts @@ -1,5 +1,4 @@ import {isDebug} from '@actions/core' -import {existsSync} from 'fs' import {ActionInterface} from './constants' /* Utility function that checks to see if a value is undefined or not. */ @@ -51,12 +50,6 @@ export const hasRequiredParameters = (action: ActionInterface): void => { "Incorrectly formatted build folder. The deployment folder cannot be prefixed with '/' or './'. Instead reference the folder name directly." ) } - - if (!existsSync(action.folder) && action.folder !== action.root) { - throw new Error( - `The ${action.folder} directory you're trying to deploy doesn't exist. ❗` - ) - } } /* Suppresses sensitive information from being exposed in error messages. */