Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs CI #2

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ concurrency:

jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Docs

on:
push:
tags:
- "v*"

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # to get gh-pages
- uses: astral-sh/setup-uv@v3
- name: Sync
run: uv sync
- name: Deploy
run: mike deploy ${{ github.ref_name }} latest
- name: Checkout gh-pages
run: git checkout gh-pages
- uses: actions/upload-pages-artifact@v3
id: deployment
with:
path: .
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/deploy-pages@v4
id: deployment
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ Your commits do not have to but if you'd like to format them this way, we would
If you can, use `git rebase -i` to create a clean, well-formatted history before opening your pull request.
If you need to make changes after opening your pull request (e.g. to fix CI breakages) we will be grateful if you squash those fixes into their relevant commits.

Thanks so much! \
Thanks so much!

-Pete Gadomski
1 change: 1 addition & 0 deletions docs/CODE_OF_CONDUCT
1 change: 1 addition & 0 deletions docs/CONTRIBUTING.md
1 change: 1 addition & 0 deletions docs/LICENSE-APACHE
1 change: 1 addition & 0 deletions docs/LICENSE-MIT
Binary file added docs/img/stac-ferris.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 0 additions & 55 deletions docs/index.md

This file was deleted.

1 change: 1 addition & 0 deletions docs/index.md
15 changes: 15 additions & 0 deletions docs/stylesheets/extra.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
:root {
--md-primary-fg-color: rgb(55, 108, 129);
--md-primary-fg-color--light: rgb(228, 246, 251);
--md-primary-fg-color--dark: rgb(26, 78, 99);
--md-accent-fg-color: rgb(78, 180, 174);
--md-accent-fg-color--transparent: rgba(78, 180, 174, 0.5);
}

[data-md-color-scheme="stac"] {
--md-primary-fg-color: rgb(55, 108, 129);
--md-primary-fg-color--light: rgb(228, 246, 251);
--md-primary-fg-color--dark: rgb(26, 78, 99);
--md-accent-fg-color: rgb(78, 180, 174);
--md-accent-fg-color--transparent: rgba(78, 180, 174, 0.5);
}
66 changes: 66 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
site_name: stacrs
site_description: A small no-dependency Python package for STAC, using Rust under the hood.
site_url: https://gadom.ski/stacrs
repo_url: https://github.com/gadomski/stacrs
theme:
name: material
logo: img/stac-ferris.png
icon:
repo: fontawesome/brands/github
favicon: img/stac-ferris.png
features:
- navigation.indexes
- navigation.footer
palette:
scheme: stac
primary: custom

nav:
- Home: index.md
- Example notebook: example.ipynb
- API:
- api/index.md
- migrate: api/migrate.md
- read: api/read.md
- search: api/search.md
- validate: api/validate.md
- version: api/version.md
- write: api/write.md
- CONTRIBUTING.md

plugins:
- mike
- mkdocs-jupyter
- mkdocstrings:
enable_inventory: true
handlers:
python:
load_external_modules: false
options:
show_root_heading: true
show_signature: true
show_signature_annotations: true
separate_signature: true
- search
- social:
cards_layout_options:
color: rgb(26, 78, 99)
background_color: rgb(228, 246, 251)

markdown_extensions:
- admonition
- pymdownx.highlight:
anchor_linenums: true
line_spans: __span
pygments_lang_class: true
- pymdownx.inlinehilite
- pymdownx.snippets
- pymdownx.superfences
- pymdownx.details

extra:
version:
provider: mike

extra_css:
- stylesheets/extra.css
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ ignore_missing_imports = true
[tool.uv]
dev-dependencies = [
"maturin>=1.7.4",
"mike>=2.1.3",
"mkdocs-jupyter>=0.25.1",
"mkdocs-material[imaging]>=9.5.45",
"mkdocstrings[python]>=0.27.0",
"mypy>=1.11.2",
"pytest>=8.3.3",
"ruff>=0.6.9",
Expand Down
Loading