You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.1 KiB

  1. on:
  2. schedule:
  3. - cron: '0 */6 * * *'
  4. jobs:
  5. update:
  6. runs-on: ubuntu-latest
  7. steps:
  8. - uses: actions/checkout@master
  9. - name: Build the data and create local changes
  10. uses: actions/setup-python@v1
  11. with:
  12. python-version: '3.6.10'
  13. architecture: x64
  14. - run: |
  15. pip install -r requirements.txt
  16. python process.py
  17. - name: Commit files
  18. run: |
  19. git config --local user.email "action@github.com"
  20. git config --local user.name "GitHub Action"
  21. git commit --allow-empty -m "Daily auto-update of the data" -a
  22. - name: Push changes
  23. uses: ad-m/github-push-action@master
  24. with:
  25. github_token: ${{ secrets.gh }}
  26. deploy:
  27. needs: update
  28. runs-on: ubuntu-latest
  29. steps:
  30. - uses: actions/checkout@v1
  31. - uses: actions/setup-node@v1
  32. with:
  33. node-version: '8.x'
  34. - run: npm install -g data-cli
  35. - run: data --version
  36. - run: data push
  37. env:
  38. id: ${{secrets.dhid}}
  39. username: ${{secrets.dhusername}}
  40. token: ${{secrets.dhtoken}}