Skip to content

Commit 7bee90c

Browse files
committed
feat: adding complete example
1 parent c09179c commit 7bee90c

File tree

1 file changed

+49
-1
lines changed

1 file changed

+49
-1
lines changed

README.md

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,17 @@ Do you have other Github actions (Lighthouse, Cypress, etc) that depend on the N
1212

1313
Optional — The amount of time to spend waiting on Netlify. Defaults to `60` seconds
1414

15+
## Outputs
16+
17+
### `url`
18+
19+
The netlify deploy preview url that was deployed.
20+
1521
## Example usage
1622

17-
```
23+
Basic Usage
24+
25+
```yaml
1826
steps:
1927
- name: Waiting for 200 from the Netlify Preview
2028
uses: jakepartusch/wait-for-netlify-action@v1
@@ -23,3 +31,43 @@ steps:
2331
site_name: "jakepartusch"
2432
max_timeout: 60
2533
```
34+
35+
<details>
36+
<summary>Complete example with Lighthouse</summary>
37+
<br />
38+
39+
```yaml
40+
name: Lighthouse
41+
42+
on: [pull_request]
43+
44+
jobs:
45+
build:
46+
runs-on: ubuntu-latest
47+
48+
steps:
49+
- uses: actions/checkout@v1
50+
- name: Use Node.js 12.x
51+
uses: actions/setup-node@v1
52+
with:
53+
node-version: 12.x
54+
- name: Install
55+
run: |
56+
npm ci
57+
- name: Build
58+
run: |
59+
npm run build
60+
- name: Waiting for 200 from the Netlify Preview
61+
uses: jakepartusch/wait-for-netlify-action@v1
62+
id: waitFor200
63+
with:
64+
site_name: "jakepartusch"
65+
- name: Lighthouse CI
66+
run: |
67+
npm install -g @lhci/[email protected]
68+
lhci autorun --upload.target=temporary-public-storage --collect.url=${{ steps.waitFor200.outputs.url }} || echo "LHCI failed!"
69+
env:
70+
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
71+
```
72+
73+
</details>

0 commit comments

Comments
 (0)