Skip to content

Commit 999b3b2

Browse files
authored
Check documentation in on-push workflow (#46)
1 parent 645ebfe commit 999b3b2

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.github/workflows/on-push.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17+
# Build library
1718
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
1819

1920
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
@@ -27,6 +28,7 @@ jobs:
2728
- name: Run library build
2829
run: npm run build
2930

31+
# Build and test example app
3032
- name: Install example dependencies
3133
run: cd example && npm ci
3234

@@ -35,3 +37,14 @@ jobs:
3537

3638
- name: Run example tests
3739
run: cd example && npm run test
40+
41+
# Check documentation
42+
- name: Generate documentation
43+
run: yarn build:docs
44+
45+
- name: Check for documentation changes
46+
run: |
47+
if [[ -n $(git status --porcelain | grep "README.md") ]]; then
48+
echo "Documentation is not up to date!"
49+
exit 1
50+
fi

docs/README_BASE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,4 +174,4 @@ useEffect(() => {
174174
>
175175
CustomEvent.trackEvent button
176176
</button>
177-
```
177+
```

0 commit comments

Comments
 (0)