mirai/.github/workflows/doc.yml
Karlatemp b227f719a2
Fix kt compiler errors (#1159)
* Fix kt compiler errors

* Revert "Fix compiler bug, fix #1136"

This reverts commit 39f6c168

* Fix log style

Co-authored-by: Him188 <Him188@mamoe.net>
2021-04-05 22:41:26 +08:00

72 lines
2.3 KiB
YAML

# This is a basic workflow to help you get started with Actions
name: mirai-doc Publish
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
release:
types:
- created
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
mirai-core-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: chmod -R 777 *
run: chmod -R 777 *
- name: Gradle build -Pmirai.pkc.check.enable
run: ./gradlew clean build -Pmirai.pkc.check.enable # if test's failed, don't publish
- name: Dokka
run: ./gradlew :mirai-core-api:dokkaHtml -Pmirai.pkc.check.enable
- name: GitHub Pages Deploy
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.MAMOE_TOKEN }}
publish_dir: ./mirai-core-api/build/dokka
external_repository: project-mirai/mirai-doc
publish_branch: master
user_name: 'mamoebot'
user_email: 'mamoebot@users.noreply.github.com'
keep_files: true
# This workflow contains a single job called "build"
mirai-console-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: chmod -R 777 *
run: chmod -R 777 *
- name: Gradle build
run: ./gradlew clean build -Pmirai.pkc.check.enable # if test's failed, don't publish
- name: Dokka
run: ./gradlew :mirai-console:dokkaHtml -Pmirai.pkc.check.enable
- name: GitHub Pages Deploy
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.MAMOE_TOKEN }}
publish_dir: ./mirai-console/build/dokka
external_repository: project-mirai/mirai-doc
publish_branch: master
user_name: 'mamoebot'
user_email: 'mamoebot@users.noreply.github.com'
keep_files: true