-
Notifications
You must be signed in to change notification settings - Fork 2
37 lines (34 loc) · 1.06 KB
/
render.yml
File metadata and controls
37 lines (34 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: render-readme
on:
push:
branches: [main]
paths: ['registry.json']
permissions:
contents: read
jobs:
render:
if: github.actor != 'github-actions[bot]' || !startsWith(github.event.head_commit.message, 'docs(readme):')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
# pin: v6.0.0 -- actions/checkout
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
# pin: v6.0.0 -- actions/setup-node
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903
with:
node-version-file: '.nvmrc'
cache: 'npm'
- run: npm ci
- run: npm run render
- name: Commit README
run: |
if ! git diff --quiet README.md; then
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add README.md
git commit -m "docs(readme): regenerate entry table"
git push
else
echo "no changes"
fi