Skip to content

Commit b6409cd

Browse files
authored
Merge pull request #33 from SAP-samples/feat/vitepress-docs-site
Feat/vitepress docs site
2 parents b4a8557 + fb5cf7f commit b6409cd

68 files changed

Lines changed: 7541 additions & 228 deletions

Some content is hidden

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

.claude/settings.local.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"mcp__plugin_playwright_playwright__browser_navigate",
66
"Bash(git -C d:/projects/cap-hana-exercises-codejam log --oneline -10)",
77
"Bash(git add:*)",
8-
"Bash(git commit:*)"
8+
"Bash(git commit:*)",
9+
"WebFetch(domain:raw.githubusercontent.com)"
910
]
1011
}
1112
}

.github/workflows/deploy-docs.yml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: Deploy Documentation to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'docs/**'
9+
- 'exercises/**'
10+
- 'slides/**'
11+
- '*.md'
12+
- 'solution/MyHANAApp/README.md'
13+
- '.github/workflows/deploy-docs.yml'
14+
pull_request:
15+
branches:
16+
- main
17+
paths:
18+
- 'docs/**'
19+
- 'exercises/**'
20+
- 'slides/**'
21+
- '*.md'
22+
workflow_dispatch:
23+
24+
permissions:
25+
contents: read
26+
pages: write
27+
id-token: write
28+
29+
concurrency:
30+
group: pages-${{ github.ref }}
31+
cancel-in-progress: false
32+
33+
jobs:
34+
security-scan:
35+
name: Security Scan
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/checkout@v4
39+
40+
- uses: actions/setup-node@v4
41+
with:
42+
node-version: '20'
43+
cache: 'npm'
44+
cache-dependency-path: 'docs/package-lock.json'
45+
46+
- name: Install dependencies
47+
run: npm ci
48+
working-directory: docs
49+
50+
- name: Run security audit
51+
run: npm audit --audit-level=moderate || true
52+
working-directory: docs
53+
54+
build:
55+
name: Build Documentation
56+
runs-on: ubuntu-latest
57+
needs: security-scan
58+
defaults:
59+
run:
60+
working-directory: docs
61+
steps:
62+
- uses: actions/checkout@v4
63+
with:
64+
fetch-depth: 0 # required for lastUpdated timestamps
65+
submodules: true # required for future external repo content
66+
67+
- uses: actions/setup-node@v4
68+
with:
69+
node-version: '20'
70+
cache: 'npm'
71+
cache-dependency-path: 'docs/package-lock.json'
72+
73+
- uses: actions/cache@v4
74+
with:
75+
path: docs/.vitepress/cache
76+
key: ${{ runner.os }}-vitepress-${{ hashFiles('docs/**/*.md', 'docs/.vitepress/**') }}
77+
restore-keys: |
78+
${{ runner.os }}-vitepress-
79+
80+
- name: Install dependencies
81+
run: npm ci
82+
83+
- name: Build VitePress documentation
84+
run: npm run docs:build
85+
86+
- name: Verify build output
87+
run: |
88+
test -f .vitepress/dist/index.html || \
89+
(echo "Build failed: index.html not found in dist/" && exit 1)
90+
echo "Build verification passed"
91+
92+
- uses: actions/configure-pages@v4
93+
if: github.event_name != 'pull_request'
94+
95+
- uses: actions/upload-pages-artifact@v4
96+
if: github.event_name != 'pull_request'
97+
with:
98+
path: docs/.vitepress/dist
99+
retention-days: 1
100+
101+
deploy:
102+
name: Deploy to GitHub Pages
103+
if: github.event_name != 'pull_request'
104+
environment:
105+
name: github-pages
106+
url: ${{ steps.deployment.outputs.page_url }}
107+
runs-on: ubuntu-latest
108+
needs: build
109+
steps:
110+
- uses: actions/deploy-pages@v4
111+
id: deployment

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# VitePress build output and cache
2+
docs/.vitepress/dist/
3+
docs/.vitepress/cache/
4+
5+
# Generated by @agentmarkup/vite at build time — do not commit
6+
llms.txt
7+
llms-full.txt
8+
9+
# Brainstorming session files (visual companion)
10+
.superpowers/
11+
12+
# Node dependencies
13+
node_modules/
14+
docs/node_modules/

InstructorSetup.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ This is a shared, persistent subaccount used for all CAP CodeJams — do not cre
2323

2424
1. Log in the [SAP BTP Global Account: Developer Advocates Free Tier](https://emea.cockpit.btp.cloud.sap/cockpit/#/globalaccount/275320f9-4c26-4622-8728-b6f5196075f5/accountModel&//?section=HierarchySection&view=TreeTableView).
2525
1. Navigate to the Directories and SubAccounts section. There you will find a folder for CodeJams. Within that is the Subaccount [CAP CodeJam](https://emea.cockpit.btp.cloud.sap/cockpit/#/globalaccount/275320f9-4c26-4622-8728-b6f5196075f5/subaccount/13f4f274-4515-4c67-8274-cbde80a4e744/subaccountoverview). That's where we will work.
26-
![SAP BTP SubAccount](images/instructor/subaccount.png "SAP BTP SubAccount")
26+
![SAP BTP SubAccount](/images/instructor/subaccount.png "SAP BTP SubAccount")
2727

2828
### Enable Cloud Foundry and Create a `dev` Space
2929

3030
CF is required because participants deploy HDI container service instances into this space.
3131

32-
1. Enable the Cloud Foundry Environment. ![Enable Cloud Foundry](images/instructor/enableCloudFoundry.png "Enable Cloud Foundry")
32+
1. Enable the Cloud Foundry Environment. ![Enable Cloud Foundry](/images/instructor/enableCloudFoundry.png "Enable Cloud Foundry")
3333
1. Use the default Enablement dialog choices.
34-
1. Once the org is created, create a space named `dev` ![Create Space](images/instructor/createSpace.png "Create Space")![Create Space Dialog](images/instructor/createSpace2.png "Create Space Dialog")
35-
1. Add the other instructors as Space Members with all roles.![Add Space Members](images/instructor/spaceMembers.png "Add Space Members")
34+
1. Once the org is created, create a space named `dev` ![Create Space](/images/instructor/createSpace.png "Create Space")![Create Space Dialog](/images/instructor/createSpace2.png "Create Space Dialog")
35+
1. Add the other instructors as Space Members with all roles.![Add Space Members](/images/instructor/spaceMembers.png "Add Space Members")
3636

3737
### Provisioning of SAP HANA Cloud
3838

@@ -53,31 +53,31 @@ Each participant needs both a BTP subaccount user and a Cloud Foundry space memb
5353
5454
**Action 1: Create the subaccount user and assign the Role Collection**
5555

56-
1. Navigate to the "Security" section in your SubAccount. `Security -> Users` ![Navigate to User Management](images/instructor/securityUsers.png "Navigate to User Management")
57-
1. Create User ![Create User](images/instructor/createUser.png "Create User")
58-
1. Enter the email addresses of the participants and use the `Default identity provider` ![Create User Dialog](images/instructor/createUserDialog.png "Create User Dialog")
59-
1. Assign them to the `CodeJam` Role Collection. ![Assign Role Collection](images/instructor/assignRoleCollection.png "Assign Role Collection") ![Assign CodeJam Role Collection](images/instructor/assignCodeJamRC.png "Assign CodeJam Role Collection")
56+
1. Navigate to the "Security" section in your SubAccount. `Security -> Users` ![Navigate to User Management](/images/instructor/securityUsers.png "Navigate to User Management")
57+
1. Create User ![Create User](/images/instructor/createUser.png "Create User")
58+
1. Enter the email addresses of the participants and use the `Default identity provider` ![Create User Dialog](/images/instructor/createUserDialog.png "Create User Dialog")
59+
1. Assign them to the `CodeJam` Role Collection. ![Assign Role Collection](/images/instructor/assignRoleCollection.png "Assign Role Collection") ![Assign CodeJam Role Collection](/images/instructor/assignCodeJamRC.png "Assign CodeJam Role Collection")
6060

6161
**Action 2: Add users to the Cloud Foundry space**
6262

63-
1. Assign the users to the Cloud Foundry `dev` Space ![Add Space Members](images/instructor/spaceMembers.png "Add Space Members")
63+
1. Assign the users to the Cloud Foundry `dev` Space ![Add Space Members](/images/instructor/spaceMembers.png "Add Space Members")
6464

6565
## After the Event
6666

6767
Run these steps after every event to avoid ongoing costs and reset the subaccount for next time.
6868

69-
1. Delete all the HDI container instances from the BTP Cockpit SubAccount/Instances views. ![Delete Service Instances](images/instructor/cleanupDeleteServiceInstances.png "Delete Service Instances")
69+
1. Delete all the HDI container instances from the BTP Cockpit SubAccount/Instances views. ![Delete Service Instances](/images/instructor/cleanupDeleteServiceInstances.png "Delete Service Instances")
7070

71-
1. Disable the Cloud Foundry Environment. This will remove all user access at the CF level and clean up remaining resources. ![Disable Cloud Foundry](images/instructor/cleanupCloudFoundry.png "Disable Cloud Foundry")
71+
1. Disable the Cloud Foundry Environment. This will remove all user access at the CF level and clean up remaining resources. ![Disable Cloud Foundry](/images/instructor/cleanupCloudFoundry.png "Disable Cloud Foundry")
7272

7373
1. Delete the HANA Cloud Instance to save money.
74-
* From the Subscriptions click on `SAP HANA Cloud`![SAP HANA Cloud Tools](images/instructor/hanaCloudTools.png "SAP HANA Cloud Tools")
75-
* Then `Actions -> Delete`![Delete](images/instructor/hanaCloudDelete.png "Delete")
74+
* From the Subscriptions click on `SAP HANA Cloud`![SAP HANA Cloud Tools](/images/instructor/hanaCloudTools.png "SAP HANA Cloud Tools")
75+
* Then `Actions -> Delete`![Delete](/images/instructor/hanaCloudDelete.png "Delete")
7676

7777
1. Remove Users
78-
* `Security -> Users` ![Navigate to User Management](images/instructor/securityUsers.png "Navigate to User Management")
79-
* Manually delete all workshop users ![Delete Users](images/instructor/deleteUsers.png "Delete Users")
78+
* `Security -> Users` ![Navigate to User Management](/images/instructor/securityUsers.png "Navigate to User Management")
79+
* Manually delete all workshop users ![Delete Users](/images/instructor/deleteUsers.png "Delete Users")
8080

8181
1. Remove Role Collections created by participants during the event
8282
* `Security -> Role Collections`
83-
* Delete any Role Collections that participants created during the event. Do **not** delete the `CodeJam` Role Collection — it is pre-existing and reused across events. ![Delete Role Collection](images/instructor/deleterolecollection.png)
83+
* Delete any Role Collections that participants created during the event. Do **not** delete the `CodeJam` Role Collection — it is pre-existing and reused across events. ![Delete Role Collection](/images/instructor/deleterolecollection.png)

0 commit comments

Comments
 (0)