Skip to content

Commit cf0b502

Browse files
Merge pull request #104
Add "Quick start" section to README with GitHub Actions workflow example
2 parents d494b2c + 7edfbbd commit cf0b502

1 file changed

Lines changed: 23 additions & 1 deletion

File tree

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,27 @@ GitHub Action that generates an always-fresh preview banner for your project and
1111
`README.md`. The action detects your package manager, builds a light/dark banner, replaces any previous preview block,
1212
commits the change in a dedicated branch, and opens a pull request with optional assignees and labels.
1313

14+
## Quick start
15+
16+
Create the file `.github/workflows/preview.yml` with the following content:
17+
18+
```yaml
19+
name: Preview Updater
20+
21+
on:
22+
schedule:
23+
- cron: '20 2 * * *'
24+
workflow_dispatch:
25+
26+
permissions:
27+
contents: write
28+
pull-requests: write
29+
30+
jobs:
31+
preview:
32+
uses: TheDragonCode/.github/.github/workflows/preview.yml@main
33+
```
34+
1435
## Usage
1536
1637
Create the file `.github/workflows/preview.yml` with the following content:
@@ -245,7 +266,8 @@ jobs:
245266

246267
## FAQ
247268

248-
> 💥 Preview Updater failed with error: Error when creating a pull request from preview/banner-***: GitHub Actions is not permitted to create or approve pull requests
269+
> 💥 Preview Updater failed with error: Error when creating a pull request from preview/banner-***: GitHub Actions is not
270+
> permitted to create or approve pull requests
249271

250272
Enable the "Allow GitHub Actions to create and approve pull requests" option in project settings.
251273

0 commit comments

Comments
 (0)