update #6
This file contains hidden or 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 READMEs | |
| on: | |
| push: | |
| paths: | |
| - '**.jsx' | |
| - '.automation/**' | |
| jobs: | |
| generate-readmes: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install dependencies | |
| run: | | |
| cd .automation | |
| npm install | |
| - name: Run gulp | |
| run: | | |
| cd .automation | |
| npx gulp | |
| - name: Commit and push if changed | |
| run: | | |
| git config --global user.name 'github-actions[bot]' | |
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
| git add '*/README.md' 'README.md' | |
| git diff --quiet && git diff --staged --quiet || (git commit -m "Auto-generate READMEs" && git push) |