Skip to content

Commit

Permalink
Add unified docs assets
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-schneider committed May 11, 2024
1 parent 8a52fd5 commit 8a33192
Show file tree
Hide file tree
Showing 14 changed files with 684 additions and 118 deletions.
Binary file removed .DS_Store
Binary file not shown.
1 change: 0 additions & 1 deletion .github/CODEOWNERS

This file was deleted.

50 changes: 50 additions & 0 deletions .github/workflows/dispatch-gh-pages-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Dispatch Deploy to GitHub Pages

on:
push:
branches:
- 'main'
- 'stage'
# Add additional content source branches here
pull_request:
branches:
- '*'

jobs:
dispatch-deploy:
runs-on: ubuntu-latest

steps:
# Determine the build branch and draft branch for dispatch.
- name: Determine Dispatch Parameters
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
# If this workflow is kicked off by a pull request, build
# a draft using the pull resource base branch and PR branch.
build_branch="${{ github.base_ref }}"
draft_branch="${{ github.event.pull_request.head.ref }}"
else
if [ "$(basename ${{ github.event.ref }})" == "stage" ]; then
# This was a merge to stage so kick off a build to update stage draft.
build_branch=stage
draft_branch=stage
else
# Otherwise this is a push to one of the source branches so
# dispatch a build for the main draft to pick up the changes.
build_branch=main
draft_branch=main
fi
fi
echo "build_branch=$build_branch" >> $GITHUB_OUTPUT
echo "draft_branch=$draft_branch" >> $GITHUB_OUTPUT
id: branches

- name: Dispatch Deploy to GitHub Pages
uses: convictional/[email protected]
with:
owner: riptano
repo: datastax-docs-site
github_token: ${{ secrets.DISPATCH_GITHUB_TOKEN }}
github_user: mlr
workflow_file_name: gh-pages-build.yml
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 }}" }'
129 changes: 15 additions & 114 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,114 +1,15 @@
build
.DS_store
*~
package-lock.json
.vscode
.java-version

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# IDE
.idea/
#OS
**/.DS_Store
**/.git-credentials

#IDE
**/.vscode/
**/.idea
**/*.iml
*.http
**/.java-version

#build
**/package-lock.json
**/node_modules/
/build/
159 changes: 159 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
= {company} {product} Docs
// Variables:
:company: DataStax
:product: Luna Streaming
:repo-name: pulsar-docs
:github-org: datastax
// Settings:
:toc: macro
:!example-caption:
:experimental:
:hide-uri-scheme:
ifdef::env-github[]
:icons: font
:toclevels: 1
:toc-title: Contents
:tip-caption: :bulb:
:note-caption: :information_source:
:important-caption: :heavy_exclamation_mark:
:caution-caption: :fire:
:warning-caption: :warning:
:badges:
endif::[]
// Project URLs:
:url-github-org: https://github.com/{github-org}
:url-project-repo: {url-github-org}/{repo-name}
:url-ui-repo: https://github.com/riptano/docs-ui
:url-playbook-repo: https://github.com/riptano/datastax-docs-site
:url-contribute:
:url-datastax: https://datastax.com
:url-datastax-docs: https://docs.datastax.com
:url-docs-preview: http://docs-preview.datastax.com
// External URLs:
:asciidoc-language: https://docs.asciidoctor.org/asciidoc/latest/

This repository contains the source files for the {company} {product} documentation.

toc::[]

== Get started

The documentation is written in {asciidoc-language}[AsciiDoc]-formatted source files located in the `modules` directory.

=== Make a simple update

For simple updates like fixing typos or modifying existing prose, it's easiest to edit the source files directly on GitHub.

NOTE: You'll need Write privileges on the repository to edit files directly on GitHub.

. Find the file you want to edit in the `modules` directory.

. Click the *Edit* icon in the upper-right corner of the file view.

. Make your changes in the editor.

. Click *Commit changes...*

. Enter a description for your commit and click *Propose changes*.

. On the *Open a pull request* screen, enter a title and description for your change, assign reviewers, then click *Create pull request*.

. Once the pull request is open, an automatic draft preview build is triggered.
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.

=== Edit docs locally

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.

. Clone this repository
+
[source,bash,subs="attributes"]
----
git clone {url-project-repo}.git
----

. 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.
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].
+
[IMPORTANT]
====
Copy your personal access token to a temporary location -- you'll need it later.
====

. 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.

. https://docs.antora.org/antora/latest/playbook/private-repository-auth/#populate-credentials-directly[Populate the credential store] with your personal access token.
For most people this means doing the following:
+
.. Create the file `$HOME/.git-credentials` and open it in your editor.
.. Add the following line:
+
[source,subs="verbatim,quotes"]
----
https://**TOKEN**:@github.com
----
+
Replace *`TOKEN`* with the personal access token you copied from GitHub.
.. Save and close the file.

. If you don't already have Node.js installed, do the following:

.. Install https://github.com/nvm-sh/nvm[nvm].
+
If you're on macOS, you can install nvm using https://brew.sh/[Homebrew]:
+
[source,bash]
----
brew install nvm
----

.. Use nvm to install Node.js.
+
[source,bash]
----
nvm install --lts
----
+
[source,bash]
----
nvm use --lts
----
+
[source,bash]
----
nvm alias default node
----

. Install the project dependencies.
+
[source,bash,subs="attributes"]
----
cd {repo-name}
----
+
[source,bash]
----
npm install
----

. Build the site.
+
[source,bash]
----
npm run build:local
----
+
If the build was successful, you'll see the following output in your terminal:
+
[source,console,subs="attributes"]
----
Site generation complete!
Open file:///Users/USERNAME/repos/{repo-name}/build/site/index.html in a browser to view your site.
----
+
To view the site, paste the entire `\file:///` path into your browser's address bar and press kbd:[Return].

[#publish-docs]
== Publish docs

To learn how to publish documentation to {url-datastax-docs}, see the {url-playbook-repo}#deploy-production[datastax-docs-site README].
2 changes: 0 additions & 2 deletions README.md

This file was deleted.

2 changes: 1 addition & 1 deletion antora.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: luna-streaming
title: Luna Streaming Documentation
title: Luna Streaming
start_page: index.adoc

asciidoc:
Expand Down
Loading

0 comments on commit 8a33192

Please sign in to comment.