doc.yml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # This is a basic workflow to help you get started with Actions
  2. name: mirai-doc Publish
  3. # Controls when the action will run. Triggers the workflow on push or pull request
  4. # events but only for the master branch
  5. on:
  6. release:
  7. types:
  8. - created
  9. # A workflow run is made up of one or more jobs that can run sequentially or in parallel
  10. jobs:
  11. # This workflow contains a single job called "build"
  12. mirai-core-docs:
  13. runs-on: ubuntu-latest
  14. steps:
  15. - uses: actions/checkout@v2
  16. - name: Set up JDK 1.8
  17. uses: actions/setup-java@v1
  18. with:
  19. java-version: 1.8
  20. - name: chmod -R 777 *
  21. run: chmod -R 777 *
  22. - name: Gradle build
  23. run: ./gradlew clean build # if test's failed, don't publish
  24. - name: Dokka
  25. run: ./gradlew :mirai-core-api:dokkaHtml
  26. - name: GitHub Pages Deploy
  27. uses: peaceiris/actions-gh-pages@v3
  28. with:
  29. personal_token: ${{ secrets.MAMOE_TOKEN }}
  30. publish_dir: ./mirai-core-api/build/dokka
  31. external_repository: project-mirai/mirai-doc
  32. publish_branch: master
  33. user_name: 'mamoebot'
  34. user_email: '[email protected]'
  35. keep_files: true
  36. # This workflow contains a single job called "build"
  37. mirai-console-docs:
  38. runs-on: ubuntu-latest
  39. steps:
  40. - uses: actions/checkout@v2
  41. - name: Checkout submodules
  42. run: git submodule update --init --recursive
  43. - name: Set up JDK 1.8
  44. uses: actions/setup-java@v1
  45. with:
  46. java-version: 1.8
  47. - name: chmod -R 777 *
  48. run: chmod -R 777 *
  49. - name: Gradle build
  50. run: ./gradlew clean build # if test's failed, don't publish
  51. - name: Dokka
  52. run: ./gradlew :mirai-console:dokkaHtml
  53. - name: GitHub Pages Deploy
  54. uses: peaceiris/actions-gh-pages@v3
  55. with:
  56. personal_token: ${{ secrets.MAMOE_TOKEN }}
  57. publish_dir: ./mirai-console/build/dokka
  58. external_repository: project-mirai/mirai-doc
  59. publish_branch: master
  60. user_name: 'mamoebot'
  61. user_email: '[email protected]'
  62. keep_files: true