Skip to content

Commit 9dcd6c5

Browse files
committed
chore: add docs publish
1 parent e949662 commit 9dcd6c5

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

.github/workflows/docs-deploy.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Deploy to GitHub pages
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ main ]
7+
paths:
8+
- 'kavaref-core/src/**'
9+
- 'kavaref-extension/src/**'
10+
- 'docs-source/**'
11+
- '.github/workflows/**'
12+
13+
permissions:
14+
contents: write
15+
pages: write
16+
id-token: write
17+
18+
jobs:
19+
docs:
20+
if: ${{ success() }}
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 0
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: 18
30+
- name: Prepare Java 17
31+
uses: actions/setup-java@v4
32+
with:
33+
java-version: 17
34+
java-package: jdk
35+
distribution: 'temurin'
36+
cache: 'gradle'
37+
- name: Cache Gradle Dependencies
38+
uses: actions/cache@v3
39+
with:
40+
path: |
41+
~/.gradle/caches
42+
~/.gradle/wrapper
43+
!~/.gradle/caches/build-cache-*
44+
key: gradle-deps-core-${{ hashFiles('**/build.gradle.kts') }}
45+
restore-keys: |
46+
gradle-deps
47+
- name: Build VuePress site
48+
run: |
49+
cd docs-source
50+
yarn -i
51+
yarn docs:build-gh-pages
52+
- name: Deploy to GitHub Pages
53+
uses: crazy-max/ghaction-github-pages@v4
54+
with:
55+
target_branch: gh-pages
56+
build_dir: docs-source/dist
57+
env:
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)