Skip to content

Commit

Permalink
Merge branch 'release/1.1.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
nwtgck committed Jun 13, 2020
2 parents 28ca95e + 7c8311a commit 75185d2
Show file tree
Hide file tree
Showing 10 changed files with 22,674 additions and 22,575 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)

## [Unreleased]

## [1.1.2] - 2020-06-13
### Added
* Add "alias" input to deploy with alias [#178](https://github.com/nwtgck/actions-netlify/pull/178) by [@rajington](https://github.com/rajington)

## [1.1.1] - 2020-05-30
### Added
* Add "netlify-config-path" input to specify path to `netlify.toml`
Expand Down Expand Up @@ -103,7 +107,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
* Deploy to Netlify
* Comment on GitHub PR

[Unreleased]: https://github.com/nwtgck/actions-netlify/compare/v1.1.1...HEAD
[Unreleased]: https://github.com/nwtgck/actions-netlify/compare/v1.1.2...HEAD
[1.1.2]: https://github.com/nwtgck/actions-netlify/compare/v1.1.1...v1.1.2
[1.1.1]: https://github.com/nwtgck/actions-netlify/compare/v1.1.0...v1.1.1
[1.1.0]: https://github.com/nwtgck/actions-netlify/compare/v1.0.13...v1.1.0
[1.0.13]: https://github.com/nwtgck/actions-netlify/compare/v1.0.12...v1.0.13
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
production-branch: master
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy from GitHub Actions"
enable-pull-request-comment: true
enable-pull-request-comment: false
enable-commit-comment: true
overwrites-pull-request-comment: true
env:
Expand All @@ -58,6 +58,9 @@ jobs:
- `enable-commit-comment: true` Comment on GitHub commit (default: true)
- `overwrites-pull-request-comment: true` Overwrites comment on pull request (default: true)
- `netlify-config-path: ./netlify.toml` Path to `netlify.toml` (default: undefined)
- `alias` Specifies the prefix for the deployment URL (default: Netlify build ID)
- `alias: ${{ github.head_ref }}` replicates the [branch deploy prefix](https://docs.netlify.com/site-deploys/overview/#definitions)
- `alias: deploy-preview-${{ github.event.number }}` replicates the [deploy preview prefix](https://docs.netlify.com/site-deploys/overview/#definitions)

### Outputs
- `deploy-url` A deployment URL generated by Netlify
Expand All @@ -66,7 +69,5 @@ jobs:

```bash
npm ci
# NOTE: ./dist/typescript is generated automatically and causes type errors. (see: https://github.com/nwtgck/actions-netlify/issues/28)
rm -r dist
npm run all
```
9 changes: 9 additions & 0 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,15 @@ describe('defaultInputs', () => {
})
})
})

describe('alias', () => {
test('it should be a string when specified', () => {
withInput('alias', 'foo', () => {
const alias: string | undefined = defaultInputs.alias()
expect(alias).toBe('foo')
})
})
})
})

// Old tests below
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ inputs:
netlify-config-path:
description: Path to netlify.toml
required: false
alias:
description: Specifies the prefix for the deployment URL
required: false
outputs:
deploy-url:
description: Deploy URL
Expand Down
Loading

4 comments on commit 75185d2

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.