Skip to content

Commit 5084b61

Browse files
Documentation Overhaul: MkDocs Website (#1013)
* Initial refactor of docs * move some docs to DEPLOYMENT * Add configuration to deployment, more readme changes * updates docs again * remove npm badge * Add missing envvars, update CONFIGURATION and serverless example * add USAGE.md * refactor documentation into docs directory and create docs site with CI/CD for deployment * remove old docs and update README * update CHANGELOG * fix misspelling * remove old files from docs github workflow * misc fixes in serverless example * remove elasticsearch in docs and misc doc updates * rename api spec html, remove outdated github workflow * remove extra link from docs main page * remove unused uv.lock * add in documentation contribution section * fix vulnerability
1 parent dfc0aba commit 5084b61

File tree

26 files changed

+8391
-17158
lines changed

26 files changed

+8391
-17158
lines changed

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
**/node_modules/**
22
**/dist/**
3+
**/build/**
34
**/webpack.config.js
45
**/.nyc_output/**
56
**/coverage/**
67
tmp/**
8+
docs/api-spec.html
9+
site/**

.github/workflows/docs.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'docs/**'
9+
- 'mkdocs.yml'
10+
- 'README.md'
11+
- 'CONTRIBUTING.md'
12+
- 'CHANGELOG.md'
13+
- 'src/lambdas/api/openapi.yaml'
14+
- '.github/workflows/docs.yml'
15+
workflow_dispatch:
16+
17+
permissions:
18+
contents: read
19+
pages: write
20+
id-token: write
21+
22+
concurrency:
23+
group: "pages"
24+
cancel-in-progress: false
25+
26+
jobs:
27+
build:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v4
32+
with:
33+
fetch-depth: 0 # Fetch all history for git revision dates
34+
35+
- name: Create symlinks for root docs
36+
run: |
37+
ln -sf ../../CHANGELOG.md docs/about/changelog.md
38+
ln -sf ../../LICENSE docs/about/license.md
39+
40+
- name: Setup Node.js
41+
uses: actions/setup-node@v4
42+
with:
43+
node-version: '20'
44+
cache: 'npm'
45+
46+
- name: Install Node dependencies
47+
run: npm ci
48+
49+
- name: Build OpenAPI documentation
50+
run: npm run build-api-docs
51+
52+
- name: Setup Python
53+
uses: actions/setup-python@v5
54+
with:
55+
python-version: '3.x'
56+
57+
- name: Install MkDocs dependencies
58+
run: pip install -r requirements-docs.txt
59+
60+
- name: Configure Git for MkDocs
61+
run: |
62+
git config user.name "github-actions[bot]"
63+
git config user.email "github-actions[bot]@users.noreply.github.com"
64+
git fetch --depth=1 origin gh-pages || true
65+
66+
- name: Deploy documentation with mike
67+
run: |
68+
mike deploy --push --update-aliases 4.5 latest
69+
mike set-default --push latest
70+
71+
- name: Upload artifact
72+
uses: actions/upload-pages-artifact@v3
73+
with:
74+
path: ./site
75+
76+
deploy:
77+
environment:
78+
name: github-pages
79+
url: ${{ steps.deployment.outputs.page_url }}
80+
runs-on: ubuntu-latest
81+
needs: build
82+
steps:
83+
- name: Deploy to GitHub Pages
84+
id: deployment
85+
uses: actions/deploy-pages@v4

.github/workflows/pages.yaml

Lines changed: 0 additions & 52 deletions
This file was deleted.

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,9 @@ _book
1818
serverless*.yml
1919
!serverless.example.yml
2020
tsconfig.tsbuildinfo
21-
docs/
21+
22+
# MkDocs
23+
site/
24+
.cache/
25+
docs/api-spec.html
26+

.husky/pre-commit

100644100755
Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
1+
#!/usr/bin/env sh
2+
3+
# Load nvm
4+
export NVM_DIR="$HOME/.nvm"
5+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
6+
7+
# Use project's Node version
8+
if [ -f .nvmrc ]; then
9+
nvm use
10+
fi
11+
12+
# Run checks
113
npm run lint
214
npm run typecheck
315
npm run check-openapi
416
npm run audit-prod
517
npm run test:unit
618
npm run test:system
719
npm run build
8-
npm run build-api-docs

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

8+
## [Unreleased]
9+
10+
### Changed
11+
12+
- **Documentation Overhaul**: Migrated all documentation to a new MkDocs-powered documentation website at [stac-utils.github.io/stac-server](https://stac-utils.github.io/stac-server/)
13+
- Comprehensive documentation now organized into Getting Started, Guides, Reference, and About sections
14+
- Removed top-level markdown files (ARCHITECTURE.md, USAGE.md, DEPLOYMENT.md, CONFIGURATION.md, CONTRIBUTING.md, SECURITY.md) - all content migrated to docs/
15+
- Updated README.md to serve as GitHub landing page with links to full documentation
16+
817
## [4.5.0]
918

1019
### Added
@@ -437,7 +446,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
437446
- Landing Page (root) now has links for both GET and POST methods of search link relation
438447
- The STAC API version is now 1.0.0-rc.2
439448
- AWS OpenSearch Service OpenSearch 2.3 is used as the default instead of Elasticsearch 7.10.
440-
See [migration section in README.md](README.md#04x---05x).
449+
See [migration section in README.md](https://github.com/stac-utils/stac-server/blob/main/README.md#04x---05x).
441450
- The serverless.example.yml file now has zone awareness enabled and an even number of
442451
Elasticsearch nodes
443452
- Upgrade serverless to 3.x

0 commit comments

Comments
 (0)