ci: update path to script #3
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 README.md on push to main | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| update-readme: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Dart | |
| uses: dart-lang/setup-dart@v1 | |
| with: | |
| sdk: stable | |
| - name: Install dependencies | |
| run: dart pub get | |
| - name: Generate README | |
| run: dart run tool/readme.dart | |
| - name: Commit changes | |
| 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 | |
| git diff --cached --quiet || git commit -m 'docs(readme): update README.md [skip ci]' | |
| - name: Push changes | |
| uses: ad-m/github-push-action@v1 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} |