Build README #1733
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 17 * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '12' | |
- name: Install dependencies | |
run: npm install | |
- name: Update README | |
env: | |
INSIN_TOKEN: ${{ secrets.INSIN_TOKEN }} | |
run: |- | |
npm run build | |
cat README.md | |
- name: Commit and push if README changed | |
run: |- | |
git diff | |
git config --global user.email "readme-bot@example.com" | |
git config --global user.name "README-bot" | |
git diff --quiet || (git add README.md && git commit -m "Updated README") | |
git push |