Skip to content

Commit 5223905

Browse files
authored
Updates for unified build (#46)
* Updates for unified doc site * Add workflow for pull request draft builds
1 parent c9edd41 commit 5223905

File tree

3 files changed

+48
-3
lines changed

3 files changed

+48
-3
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 }}" }'

antora.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ start_page: index.adoc
55

66
asciidoc:
77
attributes:
8+
product_name: 'Astra Streaming'
89
allow-uri-read: '' # this has no effect in antora, but does help development in Intellij
910
pulsar_version: '2.10' #DO NOT INCLUDE PATCH VERSION <MAJOR>.<MINOR>.<PATCH>
1011
debezium_version: '1.7'
1112
request_feature_access_email: '[email protected]'
1213

1314
nav:
14-
- modules/ROOT/nav.adoc
15+
- modules/ROOT/nav.adoc

modules/ROOT/pages/index.adoc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
= DataStax Streaming Learning
2-
:page-layout: gcx-landing
32
:blank: {empty}
43

54
The learning site is a collection of guides and articles about DataStax streaming products. Each product has its own area dedicated to providing specifics to get started, its features, and other details. The learning site helps you get the most out of each product and get to production using best practices.
@@ -90,4 +89,4 @@ xref:streaming-learning:functions:cast.adoc[Cast] | xref:streaming-learning:func
9089
=== Topic Subscriptions
9190

9291
Subscriptions in Pulsar describe which consumers are consuming data from a topic and how they want to consume that data. +
93-
xref:streaming-learning:subscriptions:astream-subscriptions-exclusive.adoc[Exclusive] | xref:streaming-learning:subscriptions:astream-subscriptions-shared.adoc[Shared] | xref:streaming-learning:subscriptions:astream-subscriptions-failover.adoc[Failover] | xref:streaming-learning:subscriptions:astream-subscriptions-keyshared.adoc[Key Shared]
92+
xref:streaming-learning:subscriptions:astream-subscriptions-exclusive.adoc[Exclusive] | xref:streaming-learning:subscriptions:astream-subscriptions-shared.adoc[Shared] | xref:streaming-learning:subscriptions:astream-subscriptions-failover.adoc[Failover] | xref:streaming-learning:subscriptions:astream-subscriptions-keyshared.adoc[Key Shared]

0 commit comments

Comments
 (0)