Skip to content

Commit 9812ce2

Browse files
eric-schneidermlr
andauthored
2.10_3.x Post-unification updates (#144)
* Add unified docs assets * Add workflow for pull request draft builds (#139) * Delete old dispatch workflow --------- Co-authored-by: Ronnie Miller <[email protected]>
1 parent 8a52fd5 commit 9812ce2

14 files changed

+679
-118
lines changed

.DS_Store

-6 KB
Binary file not shown.

.github/CODEOWNERS

-1
This file was deleted.
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 }}" }'

.gitignore

+15-114
Original file line numberDiff line numberDiff line change
@@ -1,114 +1,15 @@
1-
build
2-
.DS_store
3-
*~
4-
package-lock.json
5-
.vscode
6-
.java-version
7-
8-
# Logs
9-
logs
10-
*.log
11-
npm-debug.log*
12-
yarn-debug.log*
13-
yarn-error.log*
14-
lerna-debug.log*
15-
16-
# Diagnostic reports (https://nodejs.org/api/report.html)
17-
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
18-
19-
# Runtime data
20-
pids
21-
*.pid
22-
*.seed
23-
*.pid.lock
24-
25-
# Directory for instrumented libs generated by jscoverage/JSCover
26-
lib-cov
27-
28-
# Coverage directory used by tools like istanbul
29-
coverage
30-
*.lcov
31-
32-
# nyc test coverage
33-
.nyc_output
34-
35-
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
36-
.grunt
37-
38-
# Bower dependency directory (https://bower.io/)
39-
bower_components
40-
41-
# node-waf configuration
42-
.lock-wscript
43-
44-
# Compiled binary addons (https://nodejs.org/api/addons.html)
45-
build/Release
46-
47-
# Dependency directories
48-
node_modules/
49-
jspm_packages/
50-
51-
# TypeScript v1 declaration files
52-
typings/
53-
54-
# TypeScript cache
55-
*.tsbuildinfo
56-
57-
# Optional npm cache directory
58-
.npm
59-
60-
# Optional eslint cache
61-
.eslintcache
62-
63-
# Microbundle cache
64-
.rpt2_cache/
65-
.rts2_cache_cjs/
66-
.rts2_cache_es/
67-
.rts2_cache_umd/
68-
69-
# Optional REPL history
70-
.node_repl_history
71-
72-
# Output of 'npm pack'
73-
*.tgz
74-
75-
# Yarn Integrity file
76-
.yarn-integrity
77-
78-
# dotenv environment variables file
79-
.env
80-
.env.test
81-
82-
# parcel-bundler cache (https://parceljs.org/)
83-
.cache
84-
85-
# Next.js build output
86-
.next
87-
88-
# Nuxt.js build / generate output
89-
.nuxt
90-
dist
91-
92-
# Gatsby files
93-
.cache/
94-
# Comment in the public line in if your project uses Gatsby and *not* Next.js
95-
# https://nextjs.org/blog/next-9-1#public-directory-support
96-
# public
97-
98-
# vuepress build output
99-
.vuepress/dist
100-
101-
# Serverless directories
102-
.serverless/
103-
104-
# FuseBox cache
105-
.fusebox/
106-
107-
# DynamoDB Local files
108-
.dynamodb/
109-
110-
# TernJS port file
111-
.tern-port
112-
113-
# IDE
114-
.idea/
1+
#OS
2+
**/.DS_Store
3+
**/.git-credentials
4+
5+
#IDE
6+
**/.vscode/
7+
**/.idea
8+
**/*.iml
9+
*.http
10+
**/.java-version
11+
12+
#build
13+
**/package-lock.json
14+
**/node_modules/
15+
/build/

README.adoc

+159
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
= {company} {product} Docs
2+
// Variables:
3+
:company: DataStax
4+
:product: Luna Streaming
5+
:repo-name: pulsar-docs
6+
:github-org: datastax
7+
// Settings:
8+
:toc: macro
9+
:!example-caption:
10+
:experimental:
11+
:hide-uri-scheme:
12+
ifdef::env-github[]
13+
:icons: font
14+
:toclevels: 1
15+
:toc-title: Contents
16+
:tip-caption: :bulb:
17+
:note-caption: :information_source:
18+
:important-caption: :heavy_exclamation_mark:
19+
:caution-caption: :fire:
20+
:warning-caption: :warning:
21+
:badges:
22+
endif::[]
23+
// Project URLs:
24+
:url-github-org: https://github.com/{github-org}
25+
:url-project-repo: {url-github-org}/{repo-name}
26+
:url-ui-repo: https://github.com/riptano/docs-ui
27+
:url-playbook-repo: https://github.com/riptano/datastax-docs-site
28+
:url-contribute:
29+
:url-datastax: https://datastax.com
30+
:url-datastax-docs: https://docs.datastax.com
31+
:url-docs-preview: http://docs-preview.datastax.com
32+
// External URLs:
33+
:asciidoc-language: https://docs.asciidoctor.org/asciidoc/latest/
34+
35+
This repository contains the source files for the {company} {product} documentation.
36+
37+
toc::[]
38+
39+
== Get started
40+
41+
The documentation is written in {asciidoc-language}[AsciiDoc]-formatted source files located in the `modules` directory.
42+
43+
=== Make a simple update
44+
45+
For simple updates like fixing typos or modifying existing prose, it's easiest to edit the source files directly on GitHub.
46+
47+
NOTE: You'll need Write privileges on the repository to edit files directly on GitHub.
48+
49+
. Find the file you want to edit in the `modules` directory.
50+
51+
. Click the *Edit* icon in the upper-right corner of the file view.
52+
53+
. Make your changes in the editor.
54+
55+
. Click *Commit changes...*
56+
57+
. Enter a description for your commit and click *Propose changes*.
58+
59+
. On the *Open a pull request* screen, enter a title and description for your change, assign reviewers, then click *Create pull request*.
60+
61+
. Once the pull request is open, an automatic draft preview build is triggered.
62+
Once complete, the build system posts a comment on the pull request with a link to the draft site for you to preview your changes.
63+
64+
=== Edit docs locally
65+
66+
If you need to make substantial updates to the documentation, you'll want to clone the repository so you can work with the source files locally.
67+
68+
. Clone this repository
69+
+
70+
[source,bash,subs="attributes"]
71+
----
72+
git clone {url-project-repo}.git
73+
----
74+
75+
. https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic[Create a _classic_ personal access token] for your GitHub account.
76+
When configuring the token, set the *Expiration* to at least 90 days and select everything under the *Repo* https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes[scope].
77+
+
78+
[IMPORTANT]
79+
====
80+
Copy your personal access token to a temporary location -- you'll need it later.
81+
====
82+
83+
. https://docs.github.com/en/enterprise-cloud@latest/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on[Authorize your personal access token] so that it can access repositories in the Riptano and DataStax organizations in GitHub.
84+
85+
. https://docs.antora.org/antora/latest/playbook/private-repository-auth/#populate-credentials-directly[Populate the credential store] with your personal access token.
86+
For most people this means doing the following:
87+
+
88+
.. Create the file `$HOME/.git-credentials` and open it in your editor.
89+
.. Add the following line:
90+
+
91+
[source,subs="verbatim,quotes"]
92+
----
93+
https://**TOKEN**:@github.com
94+
----
95+
+
96+
Replace *`TOKEN`* with the personal access token you copied from GitHub.
97+
.. Save and close the file.
98+
99+
. If you don't already have Node.js installed, do the following:
100+
101+
.. Install https://github.com/nvm-sh/nvm[nvm].
102+
+
103+
If you're on macOS, you can install nvm using https://brew.sh/[Homebrew]:
104+
+
105+
[source,bash]
106+
----
107+
brew install nvm
108+
----
109+
110+
.. Use nvm to install Node.js.
111+
+
112+
[source,bash]
113+
----
114+
nvm install --lts
115+
----
116+
+
117+
[source,bash]
118+
----
119+
nvm use --lts
120+
----
121+
+
122+
[source,bash]
123+
----
124+
nvm alias default node
125+
----
126+
127+
. Install the project dependencies.
128+
+
129+
[source,bash,subs="attributes"]
130+
----
131+
cd {repo-name}
132+
----
133+
+
134+
[source,bash]
135+
----
136+
npm install
137+
----
138+
139+
. Build the site.
140+
+
141+
[source,bash]
142+
----
143+
npm run build:local
144+
----
145+
+
146+
If the build was successful, you'll see the following output in your terminal:
147+
+
148+
[source,console,subs="attributes"]
149+
----
150+
Site generation complete!
151+
Open file:///Users/USERNAME/repos/{repo-name}/build/site/index.html in a browser to view your site.
152+
----
153+
+
154+
To view the site, paste the entire `\file:///` path into your browser's address bar and press kbd:[Return].
155+
156+
[#publish-docs]
157+
== Publish docs
158+
159+
To learn how to publish documentation to {url-datastax-docs}, see the {url-playbook-repo}#deploy-production[datastax-docs-site README].

README.md

-2
This file was deleted.

antora.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: luna-streaming
2-
title: Luna Streaming Documentation
2+
title: Luna Streaming
33
start_page: index.adoc
44

55
asciidoc:

0 commit comments

Comments
 (0)