|
| 1 | +# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node |
| 2 | +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions |
| 3 | + |
| 4 | +name:Node.js CI |
| 5 | + |
| 6 | +on: |
| 7 | +push: |
| 8 | +branches:[ main ] |
| 9 | +schedule: |
| 10 | + -cron:"0 8 * * *" |
| 11 | +workflow_dispatch: |
| 12 | + |
| 13 | +jobs: |
| 14 | +build: |
| 15 | +runs-on:ubuntu-latest |
| 16 | + |
| 17 | +steps: |
| 18 | + -uses:actions/checkout@v2 |
| 19 | + -name:Generate data |
| 20 | +uses:actions/setup-node@v1 |
| 21 | +with: |
| 22 | +node-version:latest |
| 23 | + -run:node generate.js |
| 24 | + -name:Commit & Push Generated Data |
| 25 | +run:| |
| 26 | + git config --local user.email "actions@github.com" |
| 27 | + git config --local user.name "Actions Auto Build" |
| 28 | + git add -f . |
| 29 | + git commit -m "docs: generate documents" ||true |
| 30 | + git push --force origin HEAD:refs/heads/main |