Build README #3563
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: Build README | |
on: | |
schedule: | |
- cron: '0 */6 * * *' | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16.13 | |
- run: npm install | |
# Run script | |
- name: Update README | |
run: |- | |
node updateReadme.js | |
# Commit changes | |
- name: Commit and push if changed | |
run: |- | |
git add . | |
git diff | |
git config --global user.email ${{ secrets.ACTION_USER_EMAIL }} | |
git config --global user.name ${{ secrets.ACTION_USER_NAME }} | |
git commit -m "Updated README" || echo "NO changes to commit" | |
git push |