书架排序支持 #30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 }} |