Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stencell authored May 31, 2024
0 parents commit e2a7b19
Show file tree
Hide file tree
Showing 93 changed files with 6,002 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Publish to GitHub Pages
on:
push:
branches: [main]

jobs:
build:
permissions:
actions: write
checks: write
contents: write
deployments: write
issues: write
packages: write
pull-requests: write
repository-projects: write
security-events: write
statuses: write
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: "16"

- name: Install Antora
run: npm ci

- name: Generate Site
run: npm run build

- name: Publish to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: build/site
keep_files: true
52 changes: 52 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Publish PR preview to GitHub Pages

on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed # The PR preview is removed when the PR is merged
paths-ignore:
- ".gitignore"
- "README.md"

concurrency: pr-preview-${{ github.ref }}

jobs:
build:
permissions:
actions: write
checks: write
contents: write
deployments: write
issues: write
packages: write
pull-requests: write
repository-projects: write
security-events: write
statuses: write

runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '16'

- name: Install Antora
run: npm ci

- name: Generate Site
run: npm run build

- name: Publish PR preview to GitHub Pages
# Do not run if PR is from fork
if: ${{ ! github.event.pull_request.head.repo.fork }}
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./build/site
108 changes: 108 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# 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
build

# 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

# Local VSCode settings
.vscode/settings*
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"asciidoctor.asciidoctor-vscode"
]
}
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Red Hat OpenShift Data Science Quick Course

This is the starter template for creating a new quick course in the **RedHatQuickCourses** GitHub organization.

After you create a new repository based on this template, you need to edit and change several files and replace placeholder text and links in them.

1. Add a _README_ at the root of your repository and leave instructions for people contributing to your quick course. Make sure you provide the link to the GitHub issues page for your course so that contributors and users can report issues and provide feedback about your course.

1. Edit the **antora.yml** file in the repository root.
* Change the _name_, _title_ and _version_ attributes
* Edit the list of items under the _nav_ attribute to add or remove new chapters/modules to the course.

1. Edit the antora-playbook.yml file in the repository root.
* Edit only the _title_ and _start_page_ attributes in this file. You may not be required to change the other attributes unless the need arises.

1. Edit the _supplemental-ui/partials/header-content.hbs_ file and change the link in the _navbar-item_ div to point to the GitHub issues page for your repository.

1. Edit the files and folders under the _modules_ folder to structure your course content into chapters/modules and sections.

1. Take a brief look at the GitHub actions configuration in the _.github_ folder. It contains basic configuration to auto-generate HTML from the asciidoc source and render it using GitHub pages. Unless you know what you are doing with this, and have prior experience with GitHub actions workflows, do not change these files.

## Problems and Feedback
If you run into any issues, report bugs/suggestions/improvements about this template here - https://github.com/RedHatQuickCourses/course-starter/issues
16 changes: 16 additions & 0 deletions antora-playbook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
site:
title: Placeholder Course Title
start_page: placeholder-course-name::index.adoc

content:
sources:
- url: ./

asciidoc:
attributes:
page-pagination: true

ui:
bundle:
url: ./ui-bundle/ui-bundle.zip
supplemental_files: ./supplemental-ui
9 changes: 9 additions & 0 deletions antora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: placeholder-course-name
title: Placeholder Course Title
version: 1
nav:
- modules/ROOT/nav.adoc
- modules/chapter1/nav.adoc
- modules/chapter2/nav.adoc
- modules/chapter3/nav.adoc
- modules/appendix/nav.adoc
4 changes: 4 additions & 0 deletions create-ui-bundle.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

cd ui-assets
zip -r ../ui-bundle/ui-bundle.zip ./*
67 changes: 67 additions & 0 deletions devfile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
schemaVersion: 2.1.0
metadata:
name: rhods-quick-course
displayName: RHODS Quick Course
description: RHODS Quick Course published using Antora
icon: https://nodejs.org/static/images/logos/nodejs-new-pantone-black.svg
tags:
- Node.js
- Antora
- ubi8
projectType: Node.js
language: JavaScript
version: 2.1.1
starterProjects:
- name: rhods-quick-course
git:
remotes:
origin: 'https://github.com/RedHatTraining/rhods-quick-course.git'
components:
- name: runtime
container:
image: registry.access.redhat.com/ubi8/nodejs-16:latest
args: ['tail', '-f', '/dev/null']
memoryLimit: 1024Mi
mountSources: true
env:
- name: DEBUG_PORT
value: '5858'
endpoints:
- name: http-node
targetPort: 8080
- exposure: none
name: debug
targetPort: 5858
commands:
- id: install
exec:
component: runtime
commandLine: npm install
workingDir: ${PROJECT_SOURCE}
group:
kind: build
isDefault: true
- id: run
exec:
component: runtime
commandLine: npm start
workingDir: ${PROJECT_SOURCE}
group:
kind: run
isDefault: true
- id: debug
exec:
component: runtime
commandLine: npm run debug
workingDir: ${PROJECT_SOURCE}
group:
kind: debug
isDefault: true
- id: test
exec:
component: runtime
commandLine: npm test
workingDir: ${PROJECT_SOURCE}
group:
kind: test
isDefault: true
1 change: 1 addition & 0 deletions modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* xref:index.adoc[]
6 changes: 6 additions & 0 deletions modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
= An Example Quick Course
:navtitle: Home

== Introduction

This is an example quick course demonstrating the usage of Antora for authoring and publishing quick courses.
1 change: 1 addition & 0 deletions modules/appendix/nav.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* xref:appendix.adoc[]
3 changes: 3 additions & 0 deletions modules/appendix/pages/appendix.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
= Appendix A

Content for Appendix A...
4 changes: 4 additions & 0 deletions modules/chapter1/nav.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* xref:index.adoc[]
** xref:section1.adoc[]
** xref:section2.adoc[]
** xref:section3.adoc[]
3 changes: 3 additions & 0 deletions modules/chapter1/pages/index.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
= Chapter 1

This is the home page of _Chapter_ 1 in the *hello* quick course...
3 changes: 3 additions & 0 deletions modules/chapter1/pages/section1.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
= Section 1

This is _Section 1_ of _Chapter 1_ in the *hello* quick course....
3 changes: 3 additions & 0 deletions modules/chapter1/pages/section2.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
= Section 2

This is _Section 2_ of _Chapter 1_ in the *hello* quick course....
4 changes: 4 additions & 0 deletions modules/chapter1/pages/section3.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
= Section 3

This is _Section 3_ of _Chapter 1_ in the *hello* quick course....

2 changes: 2 additions & 0 deletions modules/chapter2/nav.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* xref:index.adoc[]
** xref:section1.adoc[]
3 changes: 3 additions & 0 deletions modules/chapter2/pages/index.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
= Chapter 2

This is the home page of _Chapter 2_ in the *hello* quick course....
3 changes: 3 additions & 0 deletions modules/chapter2/pages/section1.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
= Section 1

This is _Section 1_ of _Chapter 2_ in the *hello* quick course....
Loading

0 comments on commit e2a7b19

Please sign in to comment.