-
Notifications
You must be signed in to change notification settings - Fork 648
150 lines (142 loc) · 5.93 KB
/
docs-deploy.yml
File metadata and controls
150 lines (142 loc) · 5.93 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
name: publish-site
on:
push:
branches:
- main
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Checkout lance-spark
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
repository: lancedb/lance-spark
path: lance-spark
- name: Checkout lance-namespace
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
repository: lancedb/lance-namespace
path: lance-namespace
- name: Checkout lance-ray
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
repository: lancedb/lance-ray
path: lance-ray
- name: Checkout lance-huggingface
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
repository: lance-format/lance-huggingface
path: lance-huggingface
- name: Checkout lance-namespace-impls
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
repository: lance-format/lance-namespace-impls
path: lance-namespace-impls
- name: Checkout lance-trino
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
repository: lance-format/lance-trino
path: lance-trino
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: "Set up Python"
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version-file: "docs/pyproject.toml"
- name: Install uv
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
with:
enable-cache: true
- name: Copy lance-namespace docs
run: |
cp -r lance-namespace/docs/src docs/src/format/namespace
cat >> docs/src/format/.pages << 'EOF'
- Namespace Spec: namespace
EOF
cp docs/src/format/namespace/rest.yaml docs/src/rest.yaml
- name: Copy lance-namespace-impls docs
run: |
# Copy implementation specs to the integrations folder
cp lance-namespace-impls/docs/src/*.md docs/src/format/namespace/integrations/
# Copy .pages from lance-namespace-impls and append template entry
cp lance-namespace-impls/docs/src/.pages docs/src/format/namespace/integrations/.pages
echo " - Template for New Integrations: template.md" >> docs/src/format/namespace/integrations/.pages
- name: Copy lance-huggingface docs
run: |
cp -r lance-huggingface/docs/src docs/src/integrations/huggingface
cat >> docs/src/integrations/.pages << 'EOF'
- Huggingface: huggingface
EOF
- name: Copy lance-spark docs
run: |
cp -r lance-spark/docs/src docs/src/integrations/spark
cat >> docs/src/integrations/.pages << 'EOF'
- Apache Spark: spark
EOF
- name: Copy lance-ray docs
run: |
cp -r lance-ray/docs/src docs/src/integrations/ray
cat >> docs/src/integrations/.pages << 'EOF'
- Ray: ray
EOF
- name: Copy lance-trino docs
run: |
cp -r lance-trino/docs/src docs/src/integrations/trino
cat >> docs/src/integrations/.pages << 'EOF'
- Trino: trino
EOF
- name: Copy contributing docs
run: |
mkdir -p docs/src/community/project-specific/lance
# Lance project files
cp CONTRIBUTING.md docs/src/community/project-specific/lance/general.md
cp release_process.md docs/src/community/project-specific/lance/release.md
cp rust/CONTRIBUTING.md docs/src/community/project-specific/lance/rust.md
cp python/CONTRIBUTING.md docs/src/community/project-specific/lance/python.md
cp docs/CONTRIBUTING.md docs/src/community/project-specific/lance/docs.md
# External project files
cp lance-ray/CONTRIBUTING.md docs/src/community/project-specific/ray.md
cp lance-spark/CONTRIBUTING.md docs/src/community/project-specific/spark.md
cp lance-namespace/CONTRIBUTING.md docs/src/community/project-specific/namespace.md
cp lance-namespace-impls/CONTRIBUTING.md docs/src/community/project-specific/namespace-impls.md || true
cp lance-trino/CONTRIBUTING.md docs/src/community/project-specific/trino.md
# Create .pages for project-specific
cat > docs/src/community/project-specific/.pages << 'EOF'
nav:
- index.md
- Lance: lance
- Lance Namespace: namespace.md
- Lance Namespace Impls: namespace-impls.md
- Lance Ray: ray.md
- Lance Spark: spark.md
- Lance Trino: trino.md
EOF
# Create .pages for lance subfolder
cat > docs/src/community/project-specific/lance/.pages << 'EOF'
nav:
- General: general.md
- Release: release.md
- Rust: rust.md
- Python: python.md
- Docs: docs.md
EOF
- name: Deploy
working-directory: docs
run: uv run mkdocs gh-deploy --force