2020-05-24 16:42:42 +08:00
|
|
|
# This is a basic workflow to help you get started with Actions
|
|
|
|
|
|
|
|
name: mirai-doc Publish
|
|
|
|
|
2020-08-24 20:03:59 +08:00
|
|
|
# Controls when the action will run. Triggers the workflow on push or pull request
|
2020-05-24 16:42:42 +08:00
|
|
|
# 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"
|
2021-01-28 10:39:18 +08:00
|
|
|
mirai-core-docs:
|
2020-05-24 16:42:42 +08:00
|
|
|
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: Grant execute permission for gradlew
|
|
|
|
run: chmod +x gradlew
|
|
|
|
- name: Gradle build
|
2020-08-24 20:03:59 +08:00
|
|
|
run: ./gradlew clean build # if test's failed, don't publish
|
2021-01-15 18:17:44 +08:00
|
|
|
- name: Dokka
|
|
|
|
run: ./gradlew :mirai-core-api:dokkaHtml
|
2020-08-24 20:03:59 +08:00
|
|
|
- name: GitHub Pages Deploy
|
|
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
|
|
with:
|
2020-09-12 00:26:06 +08:00
|
|
|
personal_token: ${{ secrets.MAMOE_TOKEN }}
|
2021-01-15 18:33:16 +08:00
|
|
|
publish_dir: ./mirai-core-api/build/dokka
|
2020-08-24 20:03:59 +08:00
|
|
|
external_repository: project-mirai/mirai-doc
|
|
|
|
publish_branch: master
|
2020-09-19 22:57:19 +08:00
|
|
|
user_name: 'mamoebot'
|
|
|
|
user_email: 'mamoebot@users.noreply.github.com'
|
2020-09-20 12:10:22 +08:00
|
|
|
keep_files: true
|
2020-05-24 16:42:42 +08:00
|
|
|
|
2021-01-28 10:39:18 +08:00
|
|
|
# This workflow contains a single job called "build"
|
|
|
|
mirai-console-docs:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: Set up JDK 1.8
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 1.8
|
|
|
|
- name: Grant execute permission for gradlew
|
|
|
|
run: chmod +x gradlew
|
|
|
|
- name: Gradle build
|
|
|
|
run: ./gradlew clean build # if test's failed, don't publish
|
|
|
|
- name: Dokka
|
|
|
|
run: ./gradlew :mirai-console:dokkaHtml
|
|
|
|
- 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
|
|
|
|
|