mirror of
https://github.com/jlengrand/coffeechat.git
synced 2026-03-10 08:11:20 +00:00
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
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/checkout@v4.1.0
|
|
with:
|
|
token: ${{ secrets.ACTIONS_TOKEN }}
|
|
|
|
- name: Setting up Node.js
|
|
uses: actions/setup-node@v4.0.2
|
|
with:
|
|
node-version: 'v20.12.2'
|
|
|
|
- name: Restore Node.js modules (or cache them)
|
|
uses: actions/cache@v4.0.2
|
|
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: 'actions@github.com'
|
|
message: 'Generate the README file based on latest change'
|