Repository navigation
73 lines (70 loc) · 3.04 KB
/
Copy pathdocs-build.yml
File metadata and controls
73 lines (70 loc) · 3.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright the Vortex contributors
name: Build Vortex Docs
on:
workflow_call:
outputs:
artifact-id:
description: "HTML artifact for this build"
value: ${{ jobs.build.outputs.artifact-id }}
# Inherit the caller's token permissions. Production includes draft releases,
# which require contents: write. Previews use contents: read and published releases.
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
outputs:
artifact-id: ${{ steps.artifact.outputs.artifact-id }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
persist-credentials: false
- parallel:
- uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up JDK 17
uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6
with:
java-version: "17"
distribution: "temurin"
- name: Install uv
uses: spiraldb/actions/.github/actions/setup-uv@a746510eafaa926484c354541cfc49b2ec06cc63 # 0.18.6
with:
sync: false
prune-cache: false
- name: Generate changelog from GitHub releases
run: uv run --no-project docs/generate_changelog.py
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# The Javadoc does not feed the Sphinx build: the docs link to it with raw HTML, and Sphinx only
# copies `_static/` into the output. So both build at once and the Javadoc is copied into the
# built site afterwards.
- parallel:
- name: Generate Javadoc for Java projects
run: |
cd lang/java
./gradlew javadoc -x makeTestFiles
- name: Build Python and Rust docs
run: uv run --all-packages make -C docs html
- name: Copy Javadoc into the built site
run: |
static=docs/_build/html/_static
mkdir -p "$static/vortex-jni" "$static/vortex-spark"
cp -r lang/java/vortex-jni/build/docs/javadoc/* "$static/vortex-jni/"
cp -r lang/java/vortex-spark/v4.0/build/vortex-spark-4.0_2.13/docs/javadoc/* "$static/vortex-spark/"
# JDK 17's javadoc stylesheet imports a font file that JDK 17 never
# generates, so every page requested a missing file. The pages fall
# back to the system fonts named in the stylesheet either way.
sed -i "/@import url('resources\/fonts\/dejavu.css');/d" \
"$static/vortex-jni/stylesheet.css" "$static/vortex-spark/stylesheet.css"
- name: Upload HTML
id: artifact
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: vortex-docs-${{ github.run_attempt }}
path: docs/_build/html
include-hidden-files: true
if-no-files-found: error
retention-days: 7