Skip to content

Commit a4df37f

Browse files
authored
Updates for unified build (#7)
* Updates for unified doc site * Update Astra CLI home page to newer landing page style * Add workflow for pull request draft builds
1 parent 1925fc3 commit a4df37f

File tree

4 files changed

+100
-40
lines changed

4 files changed

+100
-40
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Deploy Draft
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- '*'
7+
8+
jobs:
9+
dispatch-deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
# Determine the build branch and draft branch for dispatch.
14+
- name: Determine Dispatch Parameters
15+
run: |
16+
if [ "${{ github.event_name }}" == "pull_request" ]; then
17+
# If this workflow is kicked off by a pull request, build
18+
# a draft using the pull request base branch and PR branch.
19+
build_branch="${{ github.base_ref }}"
20+
draft_branch="${{ github.event.pull_request.head.ref }}"
21+
else
22+
if [ "$(basename ${{ github.event.ref }})" == "stage" ]; then
23+
# This was a merge to stage so kick off a build to update stage draft.
24+
build_branch=stage
25+
draft_branch=stage
26+
else
27+
# Otherwise this is a push to one of the source branches so
28+
# dispatch a build for the main draft to pick up the changes.
29+
build_branch=main
30+
draft_branch=main
31+
fi
32+
fi
33+
echo "build_branch=$build_branch" >> $GITHUB_OUTPUT
34+
echo "draft_branch=$draft_branch" >> $GITHUB_OUTPUT
35+
id: branches
36+
37+
- name: Deploy Draft
38+
uses: convictional/[email protected]
39+
with:
40+
owner: riptano
41+
repo: datastax-docs-site
42+
github_token: ${{ secrets.DISPATCH_GITHUB_TOKEN }}
43+
github_user: ${{ secrets.DISPATCH_GITHUB_USER }}
44+
workflow_file_name: deploy-draft.yml
45+
client_payload: '{ "build_repository": "${{ github.event.repository.full_name }}", "build_branch": "${{ steps.branches.outputs.build_branch }}", "draft_branch": "${{ steps.branches.outputs.draft_branch }}", "pull_request_number": "${{ github.event.pull_request.number }}" }'
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
name: docs
1+
name: astra-cli
22
title: Astra CLI
33
version: '0.2'
44
start_page: index.adoc
55

66
nav:
77
- modules/ROOT/nav.adoc
8+
9+
asciidoc:
10+
attributes:
11+
astra_cli: 'Astra CLI'
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
** xref:installation.adoc[]
2-
** xref:getting-started.adoc[]
3-
** xref:managing.adoc[]
4-
** xref:astra-streaming-cli.adoc[]
1+
.{astra_cli}
2+
* xref:installation.adoc[]
3+
* xref:getting-started.adoc[]
4+
* xref:managing.adoc[]
5+
* xref:astra-streaming-cli.adoc[]
Lines changed: 45 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
= {astra_cli}
2-
:page-layout: gcx-landing
2+
:page-layout: landing
33
:data-uri:
44

55
The DataStax Astra Command-Line Interface ({astra_cli}) is a set of commands used to create and manage Astra resources.
@@ -20,41 +20,51 @@ Any user with the **Organization Administrator** role may use {astra_cli} comman
2020
2121
Get started with the links below.
2222

23-
++++
24-
<div class="landing-row">
23+
[subs="macros,attributes"]
2524
++++
2625
27-
[sidebar.landing-card]
28-
.Installing and getting started
29-
****
30-
--
31-
* xref:installation.adoc[Install {astra_cli}]
32-
* xref:getting-started.adoc[Get started]
33-
--
34-
[.landing-card-body-icon]
35-
image::create-db-now.svg[icon description,40]
36-
****
37-
38-
[sidebar.landing-card]
39-
.Managing {astra_db}
40-
****
41-
--
42-
* xref:managing.adoc[]
43-
--
44-
[.landing-card-body-icon]
45-
image::what-is-astra-db.svg[icon description,40]
46-
****
47-
48-
[sidebar.landing-card]
49-
.Managing {astra_stream}
50-
****
51-
--
52-
* xref:astra-streaming-cli.adoc[]
53-
--
54-
[.landing-card-body-icon]
55-
image::what-is-astra-streaming.svg[icon description,40]
56-
****
26+
<div class="grid lg:grid-rows-1 lg:grid-cols-3 gap-6 mt-6">
27+
28+
<!-- Installing and getting started Card -->
29+
<div class="flex flex-col items-start gap-4 rounded border p-4">
30+
<div class="rounded bg-level1 p-2">
31+
svg:ROOT:create-db-now.svg[role="mx-auto my-auto w-8 h-8"]
32+
</div>
33+
34+
<div><h3 class="discrete !text-h2 !m-0">Installing and getting started</h3></div>
35+
36+
<ul class="!m-0 [&>li]:my-2">
37+
<li>xref:installation.adoc[Install {astra_cli}]</li>
38+
<li>xref:getting-started.adoc[Get started]</li>
39+
</ul>
40+
</div>
41+
42+
<!-- Managing AstraDB Card -->
43+
<div class="flex flex-col items-start gap-4 rounded border p-4">
44+
<div class="rounded bg-level1 p-2">
45+
svg:ROOT:what-is-astra-db.svg[role="mx-auto my-auto w-8 h-8"]
46+
</div>
47+
48+
<div><h3 class="discrete !text-h2 !m-0">Managing {astra_db}</h3></div>
49+
50+
<ul class="!m-0 [&>li]:my-2">
51+
<li>xref:managing.adoc[]</li>
52+
</ul>
53+
</div>
54+
55+
<!-- Managing Streaming Card -->
56+
<div class="flex flex-col items-start gap-4 rounded border p-4">
57+
<div class="rounded bg-level1 p-2">
58+
svg:ROOT:what-is-astra-streaming.svg[role="mx-auto my-auto w-8 h-8"]
59+
</div>
60+
61+
<div><h3 class="discrete !text-h2 !m-0">Managing {astra_stream}</h3></div>
62+
63+
<ul class="!m-0 [&>li]:my-2">
64+
<li>xref:astra-streaming-cli.adoc[]</li>
65+
</ul>
66+
</div>
5767
58-
++++
5968
</div>
60-
++++
69+
70+
++++

0 commit comments

Comments
 (0)