Skip to content

Commit cf0ca58

Browse files
committed
修正CI
1 parent 2bf5250 commit cf0ca58

3 files changed

Lines changed: 37 additions & 7 deletions

File tree

.github/workflows/api_doc.yml

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,20 @@ name: ApiDoc
22
on:
33
workflow_dispatch:
44
merge_group:
5+
pull_request:
6+
branches: [refactoring]
7+
paths:
8+
- .github/workflows/api_doc.yml
9+
- api/**
510
push:
611
branches: [refactoring]
712
paths:
13+
- .github/workflows/api_doc.yml
814
- api/**
915

1016
jobs:
1117
CheckApiDoc:
1218
runs-on: ubuntu-latest
13-
permissions:
14-
contents: write
1519
steps:
1620
- uses: actions/checkout@v2
1721
- name: Setup Java 17
@@ -35,9 +39,10 @@ jobs:
3539
name: api-doc
3640
path: api/build/dokka/
3741

38-
DeployApiDoc:
42+
DeployPreviewApiDoc:
3943
runs-on: ubuntu-latest
4044
needs: CheckApiDoc
45+
if: github.event_name == 'pull_request'
4146

4247
steps:
4348
- uses: actions/checkout@v4
@@ -50,5 +55,30 @@ jobs:
5055
name: api-doc
5156
path: doc
5257

58+
- name: Set Vercel project
59+
run: npx vercel link --yes --scope nightfishs-projects --project lightnovelreader-api-doc
60+
61+
- name: Deploy to Vercel
62+
run: npx vercel deploy doc --prod --yes --token=${{ secrets.VERCEL_TOKEN }}
63+
64+
DeployProductionApiDoc:
65+
runs-on: ubuntu-latest
66+
needs: CheckApiDoc
67+
if: github.event_name == 'push'
68+
69+
steps:
70+
- uses: actions/checkout@v4
71+
72+
- name: Install deps
73+
run: npm install -g vercel
74+
75+
- uses: actions/download-artifact@v4
76+
with:
77+
name: api-doc
78+
path: doc
79+
80+
- name: Set Vercel project
81+
run: npx vercel link --yes --scope nightfishs-projects --project lightnovelreader-api-doc
82+
5383
- name: Deploy to Vercel
54-
run: npx vercel deploy doc --prod --token=${{ secrets.VERCEL_TOKEN }}
84+
run: npx vercel deploy doc --yes --token=${{ secrets.VERCEL_TOKEN }}

.github/workflows/publish_epub.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ on:
66
branches: [refactoring]
77
paths:
88
- .github/workflows/publish_epub.yml
9-
- api/**
9+
- epub/**
1010

1111
jobs:
12-
PublishApiArtifact:
12+
PublishEpubArtifact:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v2

api/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ afterEvaluate {
6060

6161
groupId = "io.nightfish.lightnovelreader"
6262
artifactId = "api"
63-
version = "0.2-SNAPSHOT"
63+
version = "0.3-SNAPSHOT"
6464
}
6565
}
6666

0 commit comments

Comments
 (0)