Generate dynamic README #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate dynamic README | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- index.ts | |
- config.ts | |
jobs: | |
generate-readme: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22' | |
- name: Install dependencies | |
run: npm install | |
- name: Build package | |
run: npm run build | |
- name: Run script | |
working-directory: .github/actions | |
run: node ./generate-help-docs.mjs | |
- name: Create Pull Request | |
uses: gr2m/create-or-update-pull-request-action@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
title: 'Update options in README' | |
commit-message: 'chore: update README' | |
branch: readme-${{ github.sha }} | |
body: > | |
'Update the available options of the package in the CLI' |