doc.yml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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. build:
  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: Grant execute permission for gradlew
  21. run: chmod +x gradlew
  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