File tree 2 files changed +75
-0
lines changed
2 files changed +75
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,44 @@ export PATH="${HOME}/.local/bin:${PATH}"
24
24
python3 -m pip install --require-hashes -r .kokoro/requirements.txt
25
25
python3 -m nox --version
26
26
27
+ # build Gemini docs
28
+ nox -s gemini_docs
29
+
30
+ # create metadata
31
+ python3 -m docuploader create-metadata \
32
+ --name=" vertexai" \
33
+ --version=$( python3 setup.py --version) \
34
+ --language=$( jq --raw-output ' .language // empty' .repo-metadata.json) \
35
+ --distribution-name=" google-cloud-vertexai" \
36
+ --product-page=$( jq --raw-output ' .product_documentation // empty' .repo-metadata.json) \
37
+ --github-repository=$( jq --raw-output ' .repo // empty' .repo-metadata.json) \
38
+ --issue-tracker=$( jq --raw-output ' .issue_tracker // empty' .repo-metadata.json)
39
+
40
+ cat docs.metadata
41
+
42
+ # upload docs
43
+ python3 -m docuploader upload gemini_docs/_build/html --metadata-file docs.metadata --staging-bucket " ${STAGING_BUCKET} "
44
+
45
+
46
+ # Gemini docfx yaml files
47
+ nox -s gemini_docfx
48
+
49
+ # create metadata.
50
+ python3 -m docuploader create-metadata \
51
+ --name=" vertexai" \
52
+ --version=$( python3 setup.py --version) \
53
+ --language=$( jq --raw-output ' .language // empty' .repo-metadata.json) \
54
+ --distribution-name=" google-cloud-vertexai" \
55
+ --product-page=$( jq --raw-output ' .product_documentation // empty' .repo-metadata.json) \
56
+ --github-repository=$( jq --raw-output ' .repo // empty' .repo-metadata.json) \
57
+ --issue-tracker=$( jq --raw-output ' .issue_tracker // empty' .repo-metadata.json) \
58
+ --stem=" /vertex-ai/generative-ai/docs/reference/python"
59
+
60
+ cat docs.metadata
61
+
62
+ # upload docs
63
+ python3 -m docuploader upload gemini_docs/_build/html/docfx_yaml --metadata-file docs.metadata --destination-prefix docfx --staging-bucket " ${V2_STAGING_BUCKET} "
64
+
27
65
# build docs
28
66
nox -s docs
29
67
Original file line number Diff line number Diff line change 160
160
"python3" ,
161
161
)
162
162
163
+ # Update publish-docs to include gemini docs workflow.
164
+ s .replace (
165
+ ".kokoro/publish-docs.sh" ,
166
+ "# build docs" ,
167
+ """\
168
+ # build Gemini docs
169
+ nox -s gemini_docs
170
+ # create metadata
171
+ python3 -m docuploader create-metadata \\
172
+ --name="vertexai" \\
173
+ --version=$(python3 setup.py --version) \\
174
+ --language=$(jq --raw-output '.language // empty' .repo-metadata.json) \\
175
+ --distribution-name="google-cloud-vertexai" \\
176
+ --product-page=$(jq --raw-output '.product_documentation // empty' .repo-metadata.json) \\
177
+ --github-repository=$(jq --raw-output '.repo // empty' .repo-metadata.json) \\
178
+ --issue-tracker=$(jq --raw-output '.issue_tracker // empty' .repo-metadata.json)
179
+ cat docs.metadata
180
+ # upload docs
181
+ python3 -m docuploader upload gemini_docs/_build/html --metadata-file docs.metadata --staging-bucket "${STAGING_BUCKET}"
182
+ # Gemini docfx yaml files
183
+ nox -s gemini_docfx
184
+ # create metadata.
185
+ python3 -m docuploader create-metadata \\
186
+ --name="vertexai" \\
187
+ --version=$(python3 setup.py --version) \\
188
+ --language=$(jq --raw-output '.language // empty' .repo-metadata.json) \\
189
+ --distribution-name="google-cloud-vertexai" \\
190
+ --product-page=$(jq --raw-output '.product_documentation // empty' .repo-metadata.json) \\
191
+ --github-repository=$(jq --raw-output '.repo // empty' .repo-metadata.json) \\
192
+ --issue-tracker=$(jq --raw-output '.issue_tracker // empty' .repo-metadata.json) \\
193
+ --stem="/vertex-ai/generative-ai/docs/reference/python"
194
+ cat docs.metadata
195
+ # upload docs
196
+ python3 -m docuploader upload gemini_docs/_build/html/docfx_yaml --metadata-file docs.metadata --destination-prefix docfx --staging-bucket "${V2_STAGING_BUCKET}"
197
+ # build docs""" ,
198
+ )
199
+
163
200
s .shell .run (["nox" , "-s" , "blacken" ], hide_output = False )
You can’t perform that action at this time.
0 commit comments