Time: 1 ms (46.45%), Space: 57.9 MB (46.45%) - LeetHub #128
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: Update Root README | |
| on: | |
| push: | |
| branches: [main] | |
| paths-ignore: | |
| - "**/README.md" | |
| workflow_dispatch: | |
| jobs: | |
| update-readme: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: "20" | |
| - name: Run update script | |
| run: node .github/scripts/update-readme.js | |
| - name: Commit and push changes if README.md updated | |
| run: | | |
| git config --global user.email "action@github.com" | |
| git config --global user.name "GitHub Action" | |
| git add README.md | |
| git diff --cached --exit-code || (git commit -m "Update root README [skip ci]" && git push) |