main.yml 957 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. name: Build
  2. on:
  3. push:
  4. branches:
  5. - master
  6. schedule:
  7. - cron: '0 12 * * *'
  8. jobs:
  9. build:
  10. runs-on: ubuntu-latest
  11. strategy:
  12. matrix:
  13. node-version:
  14. - 16.x
  15. steps:
  16. - name: Checkout
  17. uses: actions/checkout@v2
  18. with:
  19. persist-credentials: false
  20. - name: Use Node.js ${{ matrix.node-version }}
  21. uses: actions/setup-node@v2
  22. with:
  23. node-version: ${{ matrix.node-version }}
  24. - run: npm i --production
  25. - run: node ./Build/build-reject-domainset.js
  26. - run: node ./Build/build-cidr.js
  27. - run: node ./Build/build-cidr.js
  28. - run: node ./Build/build-index.html.js
  29. - name: Deploy
  30. uses: peaceiris/actions-gh-pages@v3
  31. with:
  32. github_token: ${{ secrets.GIT_TOKEN }}
  33. user_name: ${{ secrets.GIT_USER }}
  34. user_email: ${{ secrets.GIT_EMAIL }}
  35. publish_branch: gh-pages
  36. publish_dir: ./
  37. # cname: ruleset.skk.moe