Skip to content

Commit faea114

Browse files
authored
Merge pull request #17 from airallergy/documentation
DOC: Add a basic documentation to be hosted on GitHub Pages
2 parents eab8f3f + a270b3c commit faea114

File tree

16 files changed

+716
-76
lines changed

16 files changed

+716
-76
lines changed

.github/workflows/publish.yml

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

.github/workflows/publish_docs.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Publish Docs
2+
3+
on:
4+
push:
5+
branches: main
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: "pages"
10+
cancel-in-progress: true
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: astral-sh/setup-uv@v4
18+
with:
19+
version: "0.5.*"
20+
enable-cache: true
21+
cache-dependency-glob: uv.lock
22+
- uses: actions/setup-python@v5
23+
with:
24+
python-version: "3.12"
25+
- run: uv sync --all-extras --all-groups
26+
- run: uv run mkdocs build --strict
27+
- uses: actions/upload-pages-artifact@v4
28+
with:
29+
path: site
30+
31+
deploy:
32+
runs-on: ubuntu-latest
33+
needs: build
34+
environment:
35+
name: github-pages
36+
url: ${{ steps.deployment.outputs.page_url }}
37+
permissions:
38+
pages: write
39+
id-token: write
40+
steps:
41+
- id: deployment
42+
uses: actions/deploy-pages@v4

.github/workflows/publish_pypi.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Publish PyPI
2+
3+
on:
4+
release:
5+
types: published
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-python@v5
13+
with:
14+
python-version: "3.12"
15+
- run: |
16+
python -m pip install build
17+
python -m build
18+
- uses: actions/upload-artifact@v4
19+
with:
20+
name: python-package-distributions
21+
path: dist/
22+
23+
upload-testpypi:
24+
runs-on: ubuntu-latest
25+
needs: build
26+
environment:
27+
name: pypi
28+
url: https://test.pypi.org/p/sober
29+
permissions:
30+
id-token: write
31+
steps:
32+
- uses: actions/download-artifact@v4
33+
with:
34+
name: python-package-distributions
35+
path: dist/
36+
- uses: pypa/gh-action-pypi-publish@release/v1
37+
with:
38+
repository-url: https://test.pypi.org/legacy/
39+
40+
upload-pypi:
41+
runs-on: ubuntu-latest
42+
needs: build
43+
environment:
44+
name: pypi
45+
url: https://pypi.org/p/sober
46+
permissions:
47+
id-token: write
48+
steps:
49+
- uses: actions/download-artifact@v4
50+
with:
51+
name: python-package-distributions
52+
path: dist/
53+
- uses: pypa/gh-action-pypi-publish@release/v1

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<picture>
2-
<source media="(prefers-color-scheme: dark)" srcset="doc/source/logo/sober_logo_white.svg">
3-
<source media="(prefers-color-scheme: light)" srcset="doc/source/logo/sober_logo_black.svg">
4-
<img alt="sober logo" src="doc/source/logo/sober_logo_black.svg" width="300">
2+
<source media="(prefers-color-scheme: light)" srcset="docs/assets/logo/sober_logo_black.svg">
3+
<source media="(prefers-color-scheme: dark)" srcset="docs/assets/logo/sober_logo_white.svg">
4+
<img alt="sober logo" src="docs/assets/logo/sober_logo_black.svg" width="300">
55
</picture>
66

77
**sober** **o**ptimises **b**uilt **e**nvironment **r**obustly

docs/api/config.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Config
2+
3+
::: sober.config

docs/api/input.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Input
2+
3+
::: sober.input

docs/api/output.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Output
2+
3+
::: sober.output

docs/api/problem.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Problem
2+
3+
::: sober.problem

0 commit comments

Comments
 (0)