Costa Rica
Last updated: 2026-02-19
A lightweight repo catalog designed to be hosted with GitHub Pages:
- Public catalog is generated at build time (GitHub Action) into
docs/catalog.json.- Site is static HTML/CSS/JS served from the
docs/folder.- By default, the Private button opens the org's private repo list on GitHub (no OAuth required).
- Optional: if you want private repos rendered inside this catalog UI, you need an OAuth callback handled by a tiny serverless endpoint (see below).
- Configure GitHub Pages in your repo settings:
- Settings → Pages → Build and deployment
- Source: Deploy from a branch
- Branch:
main(ormaster) / folder:docs
- Set your org name, this catalog is intended to index only:
https://github.com/MicrosoftCloudEssentials-LearningHub. By default the generator targetsMicrosoftCloudEssentials-LearningHub. Optional (only if you want to override locally or in a fork): add a repository variable namedORG_NAME:- Settings → Secrets and variables → Actions → Variables → New repository variable
- Name:
ORG_NAME - Value: a GitHub org (e.g.
MicrosoftCloudEssentials-LearningHub)
- Enable workflow write access. The workflow commits
docs/catalog.jsonback to the repo.- Settings → Actions → General → Workflow permissions
- Select Read and write permissions
- Run the generator:
-
Go to Actions → Build catalog → Run workflow
-
Or wait for the nightly schedule. Then open:
-
/for the catalog
-
The Translate dropdown can translate the app UI client-side. If you also want repo card content (descriptions + topics) translated on GitHub Pages without a runtime service, enable build-time translation in GitHub Actions.
- Create GitHub secrets:
AZURE_TRANSLATOR_KEYAZURE_TRANSLATOR_REGION- (Optional)
AZURE_TRANSLATOR_ENDPOINT(defaults tohttps://api.cognitive.microsofttranslator.com)
- (Optional) Create a GitHub Actions variable
TRANSLATE_TO(default:es,pt,fr) - Run Actions → Build catalog (or wait for nightly). The generator will embed translations into
docs/catalog.json.
- This section is optional. You only need it if you want private repos displayed inside the catalog.
- GitHub Pages is static hosting, so the OAuth callback (code → token exchange) must be handled by a tiny serverless endpoint. This repo includes a minimal Cloudflare Worker under
worker/that:
- Redirects the user to GitHub to sign in
- Exchanges the OAuth code for an access token
- Verifies the user is a member of
MicrosoftCloudEssentials-LearningHub - Redirects back to the catalog
- Deploy the worker in
worker/(seeworker/README.md) - Set
docs/config.json→authBaseUrlto your worker URL (example:https://org-catalog-auth.<account>.workers.dev)
Note
- The OAuth token is stored in
sessionStorageand never committed to the repo. - Anyone with the token can act with its permissions until it expires.
docs/→ GitHub Pages site (static)scripts/fetch-catalog.mjs→ generatesdocs/catalog.json.github/workflows/build-catalog.yml→ scheduled + manual generator workflow
