Skip to content

Commit

Permalink
Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesIves committed Jun 6, 2020
2 parents 922e30f + 5e3a037 commit e02f8e2
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 31 deletions.
1 change: 1 addition & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 0 additions & 23 deletions __tests__/git.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "3.5.3",
"version": "3.5.4",
"license": "MIT",
"main": "lib/lib.js",
"types": "lib/lib.d.ts",
Expand Down
7 changes: 0 additions & 7 deletions src/util.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {isDebug} from '@actions/core'
import fs from 'fs'
import {ActionInterface} from './constants'

/* Utility function that checks to see if a value is undefined or not. */
Expand Down Expand Up @@ -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 (!fs.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. */
Expand Down

0 comments on commit e02f8e2

Please sign in to comment.