main.yml 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. steps:
  12. - name: Checkout
  13. uses: actions/checkout@v4
  14. with:
  15. persist-credentials: false
  16. - uses: oven-sh/setup-bun@v1
  17. with:
  18. bun-version: canary
  19. - name: Cache cache.db
  20. uses: actions/cache@v3
  21. with:
  22. path: |
  23. .cache
  24. key: ${{ runner.os }}-v1-${{ github.sha }}
  25. # If source files changed but packages didn't, rebuild from a prior cache.
  26. restore-keys: |
  27. ${{ runner.os }}-v1
  28. - run: bun install
  29. - run: bun run build
  30. - name: Deploy
  31. uses: peaceiris/actions-gh-pages@v3
  32. with:
  33. personal_token: ${{ secrets.GIT_TOKEN }}
  34. user_name: ${{ secrets.GIT_USER }}
  35. user_email: ${{ secrets.GIT_EMAIL }}
  36. external_repository: SukkaLab/ruleset.skk.moe
  37. publish_branch: master
  38. publish_dir: public
  39. cname: ruleset.skk.moe