generated from RedHatQuickCourses/course-starter-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 806c87f
Showing
128 changed files
with
6,508 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"recommendations": [ | ||
"asciidoctor.asciidoctor-vscode" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
## Development using devspace | ||
|
||
- Access the devspace url (FIXME: url link) | ||
|
||
- Click on `Log in with OpenShift` button. | ||
|
||
- Click on `my_htpasswd_provider` option. | ||
|
||
- On the next screen, provide your Username and Password for login. | ||
|
||
- On the `Authorize Access` page, under `Requested permissions`, mae sure `user:full` option is selected (ticked) and click on `Allow selected permissions` button. | ||
|
||
- Configure your `quay.io` credentials on the OpenShift Dev Spaces portal. | ||
|
||
- Click your username on top right and click on `User Preferences` option. | ||
|
||
![](./images/devspace-userpreferences.png) | ||
|
||
- On the `User Preferences` screen under `Container Registries` tab, click on `Add Container Registry` option. | ||
|
||
- On the Add Container Registry pop-up provide details as below and the click on `Add` Button. | ||
|
||
**Registry:** *quay.io* <br> | ||
**Username:** *your quay.io login* <br> | ||
**Password:** *your quai.io login* password <br> | ||
|
||
![quay-credentials](./images/quay-credentials.png) | ||
|
||
- Click on `Create Workspace` option on left pane. | ||
Under `Import from Git section, provide the Git repo URL for your training and click on `Create & Open` button. | ||
|
||
|
||
NOTE: Make sure you have initialized your training content repository and committed the changes before using it in the devspace. | ||
|
||
- Click on the search bar for Workspace on top and click on `Run Task` option, then click `devfile`. | ||
|
||
![devspace-runtask](./images/devspace-runtask.png) | ||
|
||
- Click on `0-install` option and wait for it to finish. | ||
|
||
- Repeat the earlier step to select devfile and click on `1-watch` option this time. | ||
|
||
- Repeat the same steps and select `2-serve` option now. | ||
|
||
- Pop-up will be displayed at the bottom of the screen. | ||
|
||
![devspace-pop-up](./images/devspace-pop-up.png) | ||
|
||
- Create `Open In New Tab` button. | ||
|
||
- On the next pop-up message: `Do you want VS Code - Open Source to open the external website?` click on `Open` button. | ||
|
||
- Rendered content will now be displayed in another tab. | ||
|
||
- You may continue with your content development in the `vscode` interface provided by devspace. | ||
|
||
- 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. | ||
|
||
FIXME: highlight the relevant area on images. | ||
|
||
**SEE ALSO** | ||
|
||
- [Getting started with a new training content repository](./README.md) | ||
- [Guideline for editing your content](./USAGEGUIDE.adoc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# About this Training | ||
|
||
**Click here: [![Contribute](https://www.eclipse.org/che/contribute.svg)](https://devspaces.apps.tools-na100.dev.ole.redhat.com/#https://github.com/RedHatQuickCourses/REPLACEREPONAME) to start the development using devspace.** | ||
|
||
FIXME: Add short description about your training here. | ||
|
||
# Objectives | ||
|
||
FIXME: Add here the list of objectives being covered in this training. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
## Getting started with a new training content repository | ||
|
||
- Open the [course-starter-template](https://github.com/RedHatQuickCourses/course-starter-template) | ||
|
||
- Click on `Use This template` button and select `Create a new repository` option. | ||
|
||
![use-this-template.png](./images/use-this-template.png) | ||
|
||
- 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. | ||
|
||
![create-new-repo.png](./images/create-new-repo.png) | ||
|
||
- Clone this repository on your local system: | ||
``` | ||
git clone [email protected]:RedHatQuickCourses/my-training-repository.git | ||
``` | ||
NOTE: Use your repository url in the above command. | ||
|
||
- Go in to the course repository directory and initialize the course. | ||
``` | ||
cd my-training-repository/ | ||
sh course-init.sh --type bfx --lab demo | ||
``` | ||
NOTE: If you are using Mac, use *zsh* in place of *sh* in the above command. | ||
|
||
Sample output: | ||
``` | ||
Initializing my-training-repository . . . done | ||
Please replace the specified strings in the files below and commit the changes before proceeding with the course development. | ||
antora.yml:title: REPLACE Course Title | ||
``` | ||
|
||
- Edit the files prompted by course initialization script. | ||
|
||
- Commit the changes done by course initialization script and your manual edits. | ||
``` | ||
git status | ||
git add -A; git commit -m "course initialization" | ||
git push origin main | ||
``` | ||
|
||
- Browse your git repository url | ||
|
||
- On your github repo page, on left hand side pane, click on settings gear icon near `About` heading. | ||
|
||
- Click `Use your GitHub Pages website` option to select (checked) it and then click `Save changes` button. | ||
|
||
![github-pages-setting](./images/github-pages-setting.png) | ||
|
||
- You should now see the link to access the rendered content within that same block. | ||
|
||
![quickcourse-rendered-url](./images/quickcourse-rendered-url.png) | ||
|
||
FIXME: highlight the relevant area on images. | ||
|
||
**SEE ALSO** | ||
|
||
- [Development using devspace](./DEVSPACE.md) | ||
- [Guideline for editing your content](./USAGEGUIDE.adoc) |
Oops, something went wrong.