Skip to content

书架排序支持

书架排序支持 #30

Workflow file for this run

name: ApiDoc
on:
workflow_dispatch:
merge_group:
pull_request:
branches: [refactoring]
paths:
- .github/workflows/api_doc.yml
- api/**
push:
branches: [refactoring]
paths:
- .github/workflows/api_doc.yml
- api/**
jobs:
CheckApiDoc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Java 17
uses: actions/setup-java@v3.6.0
with:
distribution: zulu
java-version: 17
- name: Build with Gradle
uses: gradle/actions/setup-gradle@v3
- name: Make gradle wrapper executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: Check doc
run: ./gradlew api:dokkaGenerateHtml
- uses: actions/upload-artifact@v4
with:
name: api-doc
path: api/build/dokka/html
DeployPreviewApiDoc:
runs-on: ubuntu-latest
needs: CheckApiDoc
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
- name: Install deps
run: npm install -g vercel
- uses: actions/download-artifact@v4
with:
name: api-doc
path: lightnovelreader-api-doc
- name: Set Vercel project
run: npx vercel link --yes --scope nightfishs-projects --project lightnovelreader-api-doc --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy to Vercel
run: npx vercel deploy lightnovelreader-api-doc --yes --token=${{ secrets.VERCEL_TOKEN }}
DeployProductionApiDoc:
runs-on: ubuntu-latest
needs: CheckApiDoc
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v4
- name: Install deps
run: npm install -g vercel
- uses: actions/download-artifact@v4
with:
name: api-doc
path: lightnovelreader-api-doc
- name: Set Vercel project
run: npx vercel link --yes --scope nightfishs-projects --project lightnovelreader-api-doc --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy to Vercel
run: npx vercel deploy lightnovelreader-api-doc --prod --yes --token=${{ secrets.VERCEL_TOKEN }}