Skip to content

Commit

Permalink
Add url output and remove msg & gh_token inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
pavi2410 committed Jun 7, 2020
2 parents cc09f4f + 469f0a9 commit 9420cd8
Show file tree
Hide file tree
Showing 6 changed files with 691 additions and 376 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ This is just a novelty action, but feel free to use it. If you'd like to contrib

```yaml
- name: HTML Preview
uses: pavi2410/html-preview-action@master
id: html_preview
uses: pavi2410/html-preview-action@v2
with:
msg: 'Click here to preview HTML page in browser'
html_file: 'index.html'
gh_token: ${{ secrets.GITHUB_TOKEN }}
```
To get the `url` output, use this `steps.html_preview.outputs.url` in your later steps.

## Credits
https://github.com/htmlpreview/htmlpreview.github.com
15 changes: 5 additions & 10 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
name: 'HTML Preview'
author: 'Pavitra Golchha | @pavi2410'
description: 'Preview HTML page in PR'
description: 'Preview HTML page'
inputs:
msg:
description: 'The message to display on PR comment'
required: true
default: 'Click here to preview HTML page in browser'
html_file:
description: 'The HTML file you want to preview'
description: 'The HTML file you want to preview, relative to the root of the repo'
required: true
default: 'index.html'
gh_token:
description: 'GitHub Token'
required: true
default: ${{ github.token }}
outputs:
url:
description: 'The URL of the HTML file specific to this build'
runs:
using: 'node12'
main: 'dist/index.js'
Expand Down
Loading

0 comments on commit 9420cd8

Please sign in to comment.