Build README #3743
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: Build README | |
| on: | |
| push: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 */12 * * *' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repo | |
| uses: actions/checkout@v2 | |
| - name: Setup Node.js environment | |
| uses: actions/[email protected] | |
| - name: Npm install | |
| run: | | |
| npm install | |
| - name: Update README | |
| env: | |
| WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }} | |
| run: |- | |
| node build_readme.js | |
| - name: Commit and push if changed | |
| run: |- | |
| git config --global user.email "[email protected]" | |
| git config --global user.name "disflyer-bot" | |
| git config --global pull.rebase true | |
| git diff | |
| git add -A | |
| git commit -m "Updated content" || exit 0 | |
| git pull origin main | |
| git push |