Skip to content

Commit b23ee6d

Browse files
authored
Initial commit
0 parents  commit b23ee6d

File tree

128 files changed

+6506
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+6506
-0
lines changed

.github/workflows/main.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Publish to GitHub Pages
2+
on:
3+
push:
4+
branches: [main]
5+
6+
jobs:
7+
build:
8+
permissions:
9+
actions: write
10+
checks: write
11+
contents: write
12+
deployments: write
13+
issues: write
14+
packages: write
15+
pull-requests: write
16+
repository-projects: write
17+
security-events: write
18+
statuses: write
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v2
23+
24+
- name: Install Node.js
25+
uses: actions/setup-node@v2
26+
with:
27+
node-version: "16"
28+
29+
- name: Install Antora
30+
run: npm ci
31+
32+
- name: Generate Site
33+
run: npm run build
34+
35+
- name: Publish to GitHub Pages
36+
uses: peaceiris/actions-gh-pages@v3
37+
with:
38+
github_token: ${{ secrets.GITHUB_TOKEN }}
39+
publish_dir: build/site
40+
keep_files: true

.github/workflows/pr.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Publish PR preview to GitHub Pages
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- reopened
8+
- synchronize
9+
- closed # The PR preview is removed when the PR is merged
10+
paths-ignore:
11+
- ".gitignore"
12+
- "README.md"
13+
14+
concurrency: pr-preview-${{ github.ref }}
15+
16+
jobs:
17+
build:
18+
permissions:
19+
actions: write
20+
checks: write
21+
contents: write
22+
deployments: write
23+
issues: write
24+
packages: write
25+
pull-requests: write
26+
repository-projects: write
27+
security-events: write
28+
statuses: write
29+
30+
runs-on: ubuntu-latest
31+
32+
steps:
33+
- name: Checkout repository
34+
uses: actions/checkout@v2
35+
36+
- name: Install Node.js
37+
uses: actions/setup-node@v2
38+
with:
39+
node-version: '16'
40+
41+
- name: Install Antora
42+
run: npm ci
43+
44+
- name: Generate Site
45+
run: npm run build
46+
47+
- name: Publish PR preview to GitHub Pages
48+
# Do not run if PR is from fork
49+
if: ${{ ! github.event.pull_request.head.repo.fork }}
50+
uses: rossjrw/pr-preview-action@v1
51+
with:
52+
source-dir: ./build/site

.gitignore

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

.vscode/extensions.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"recommendations": [
3+
"asciidoctor.asciidoctor-vscode"
4+
]
5+
}

DEVSPACE.md

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
## Development using devspace
2+
3+
- Access the devspace url (FIXME: url link)
4+
5+
- Click on `Log in with OpenShift` button.
6+
7+
- Click on `my_htpasswd_provider` option.
8+
9+
- On the next screen, provide your Username and Password for login.
10+
11+
- On the `Authorize Access` page, under `Requested permissions`, mae sure `user:full` option is selected (ticked) and click on `Allow selected permissions` button.
12+
13+
- Configure your `quay.io` credentials on the OpenShift Dev Spaces portal.
14+
15+
- Click your username on top right and click on `User Preferences` option.
16+
17+
![](./images/devspace-userpreferences.png)
18+
19+
- On the `User Preferences` screen under `Container Registries` tab, click on `Add Container Registry` option.
20+
21+
- On the Add Container Registry pop-up provide details as below and the click on `Add` Button.
22+
23+
**Registry:** *quay.io* <br>
24+
**Username:** *your quay.io login* <br>
25+
**Password:** *your quai.io login* password <br>
26+
27+
![quay-credentials](./images/quay-credentials.png)
28+
29+
- Click on `Create Workspace` option on left pane.
30+
Under `Import from Git section, provide the Git repo URL for your training and click on `Create & Open` button.
31+
32+
33+
NOTE: Make sure you have initialized your training content repository and committed the changes before using it in the devspace.
34+
35+
- Click on the search bar for Workspace on top and click on `Run Task` option, then click `devfile`.
36+
37+
![devspace-runtask](./images/devspace-runtask.png)
38+
39+
- Click on `0-install` option and wait for it to finish.
40+
41+
- Repeat the earlier step to select devfile and click on `1-watch` option this time.
42+
43+
- Repeat the same steps and select `2-serve` option now.
44+
45+
- Pop-up will be displayed at the bottom of the screen.
46+
47+
![devspace-pop-up](./images/devspace-pop-up.png)
48+
49+
- Create `Open In New Tab` button.
50+
51+
- On the next pop-up message: `Do you want VS Code - Open Source to open the external website?` click on `Open` button.
52+
53+
- Rendered content will now be displayed in another tab.
54+
55+
- You may continue with your content development in the `vscode` interface provided by devspace.
56+
57+
- When you save your changes in the content files in devspace interface, the changes will be reflected in the rendered content url as soon as you refresh the url.
58+
59+
FIXME: highlight the relevant area on images.
60+
61+
**SEE ALSO**
62+
63+
- [Getting started with a new training content repository](./README.md)
64+
- [Guideline for editing your content](./USAGEGUIDE.adoc)

README-TRAINING.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# About this Training
2+
3+
FIXME: Add short description about your training here.
4+
5+
# Objectives
6+
7+
FIXME: Add here the list of objectives being covered in this training.
8+

README.md

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
## Getting started with a new training content repository
2+
3+
- Open the [course-starter-template](https://github.com/RedHatQuickCourses/course-starter-template)
4+
5+
- Click on `Use This template` button and select `Create a new repository` option.
6+
7+
![use-this-template.png](./images/use-this-template.png)
8+
9+
- On `Create a new repository` page, Select the options as highlighted in the below image and then click `Create repository` button at the bottom of the page.
10+
11+
![create-new-repo.png](./images/create-new-repo.png)
12+
13+
- Clone this repository on your local system:
14+
```
15+
git clone git@github.com:RedHatQuickCourses/my-training-repository.git
16+
```
17+
NOTE: Use your repository url in the above command.
18+
19+
- Go in to the course repository directory and initialize the course.
20+
```
21+
cd my-training-repository/
22+
sh course-init.sh --type bfx --lab demo
23+
```
24+
NOTE: If you are using Mac, use *zsh* in place of *sh* in the above command.
25+
26+
Sample output:
27+
```
28+
Initializing my-training-repository . . . done
29+
30+
Please replace the specified strings in the files below and commit the changes before proceeding with the course development.
31+
antora.yml:title: REPLACE Course Title
32+
```
33+
34+
- Edit the files prompted by course initialization script.
35+
36+
- Commit the changes done by course initialization script and your manual edits.
37+
```
38+
git status
39+
git add -A; git commit -m "course initialization"
40+
git push origin main
41+
```
42+
43+
- Browse your git repository url
44+
45+
- On your github repo page, on left hand side pane, click on settings gear icon near `About` heading.
46+
47+
- Click `Use your GitHub Pages website` option to select (checked) it and then click `Save changes` button.
48+
49+
![github-pages-setting](./images/github-pages-setting.png)
50+
51+
- You should now see the link to access the rendered content within that same block.
52+
53+
![quickcourse-rendered-url](./images/quickcourse-rendered-url.png)
54+
55+
FIXME: highlight the relevant area on images.
56+
57+
**SEE ALSO**
58+
59+
- [Development using devspace](./DEVSPACE.md)
60+
- [Guideline for editing your content](./USAGEGUIDE.adoc)

0 commit comments

Comments
 (0)