Skip to content

Commit 99791ff

Browse files
committed
Split off docs pipeline
1 parent 51e27ff commit 99791ff

File tree

2 files changed

+57
-35
lines changed

2 files changed

+57
-35
lines changed

.github/workflows/build.yaml

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ env:
66
LC_ALL: C.UTF-8
77
LANG: C.UTF-8
88

9-
on: [push, pull_request]
9+
on:
10+
push:
11+
pull_request:
1012

1113
jobs:
1214
build:
@@ -58,37 +60,3 @@ jobs:
5860
with:
5961
name: build-report
6062
path: build-report.zip
61-
62-
docs:
63-
name: Publish docs
64-
runs-on: ubuntu-latest
65-
environment:
66-
name: github-pages
67-
permissions:
68-
contents: read
69-
pages: write
70-
id-token: write
71-
if: startsWith(github.ref, 'refs/heads/_publish') || startsWith(github.ref, 'refs/tags/v-')
72-
steps:
73-
- name: Checkout
74-
uses: actions/checkout@v4
75-
- name: Install JDK
76-
uses: actions/setup-java@v4
77-
with:
78-
java-version: "17"
79-
distribution: "temurin"
80-
cache: "gradle"
81-
check-latest: true
82-
- name: Install common deps
83-
run: sudo scripts/build-common.sh
84-
- name: Generate docs
85-
run: ./gradlew dokkaGenerate
86-
- name: Setup Pages
87-
uses: actions/configure-pages@v5
88-
- name: Upload Artifact
89-
uses: actions/upload-pages-artifact@v3
90-
with:
91-
path: 'build/docs/html'
92-
- name: Deploy to GitHub Pages
93-
id: deployment
94-
uses: actions/deploy-pages@v4

.github/workflows/docs.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: docs
2+
3+
env:
4+
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false"
5+
RUNNING_ON_CI: "true"
6+
LC_ALL: C.UTF-8
7+
LANG: C.UTF-8
8+
9+
on:
10+
push:
11+
tags:
12+
- v-**
13+
workflow_dispatch:
14+
15+
permissions:
16+
contents: read
17+
pages: write
18+
id-token: write
19+
20+
jobs:
21+
docs:
22+
name: Publish docs
23+
runs-on: macos-latest
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
- name: Install JDK
28+
uses: actions/setup-java@v4
29+
with:
30+
java-version: "17"
31+
distribution: "temurin"
32+
cache: "gradle"
33+
check-latest: true
34+
- name: Install common deps
35+
run: sudo scripts/build-common.sh
36+
- name: Generate docs
37+
run: ./gradlew dokkaGenerate
38+
- name: Setup Pages
39+
uses: actions/configure-pages@v5
40+
- name: Upload Artifact
41+
uses: actions/upload-pages-artifact@v3
42+
with:
43+
path: 'build/docs/html'
44+
45+
docs-deploy:
46+
name: Deploy docs
47+
needs: docs
48+
runs-on: macos-latest
49+
environment:
50+
name: github-pages
51+
steps:
52+
- name: Deploy to GitHub Pages
53+
id: deployment
54+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)