-
Notifications
You must be signed in to change notification settings - Fork 70
46 lines (39 loc) · 1.13 KB
/
generate-readme.yml
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
38
39
40
41
42
43
44
45
46
name: Generate README
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'people.json'
- 'scripts/README-TEMPLATE.md'
jobs:
generate-readme:
runs-on: ubuntu-latest
steps:
- name: Checkout this repository
uses: actions/[email protected]
with:
token: ${{ secrets.ACTIONS_TOKEN }}
- name: Setting up Node.js
uses: actions/[email protected]
with:
node-version: 'v20.12.2'
- name: Restore Node.js modules (or cache them)
uses: actions/[email protected]
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }}
- name: Installing dependencies
working-directory: ./scripts
run: npm install
- name: Generate the new README file
working-directory: ./scripts
run: node write-readme.js
- name: Commit the changes
uses: EndBug/add-and-commit@v9
with:
add: 'README.md'
author_name: 'GitHub Actions'
author_email: '[email protected]'
message: 'Generate the README file based on latest change'