Skip to content

Commit 52c5563

Browse files
committed
docs: initial external docs site
1 parent c5094ff commit 52c5563

File tree

6 files changed

+70
-1
lines changed

6 files changed

+70
-1
lines changed

.github/workflows/docs.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- proper-docs
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
deploy:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: arduino/setup-task@v2
19+
with:
20+
version: 3.x
21+
repo-token: ${{ secrets.GITHUB_TOKEN }}
22+
23+
- name: setup
24+
run: task docs:deploy

.vscode/settings.json

+12-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,16 @@
1212
],
1313
"[go]": {
1414
"editor.formatOnSave": true,
15-
}
15+
},
16+
"yaml.schemas": {
17+
"https://squidfunk.github.io/mkdocs-material/schema.json": "mkdocs.yml"
18+
},
19+
"yaml.customTags": [
20+
"!ENV scalar",
21+
"!ENV sequence",
22+
"!relative scalar",
23+
"tag:yaml.org,2002:python/name:material.extensions.emoji.to_svg",
24+
"tag:yaml.org,2002:python/name:material.extensions.emoji.twemoji",
25+
"tag:yaml.org,2002:python/name:pymdownx.superfences.fence_code_format"
26+
]
1627
}

Dockerfile.docs

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FROM squidfunk/mkdocs-material

Taskfile.yml

+12
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,18 @@ tasks:
2727
generates:
2828
- ./scm-engine
2929

30+
docs:server:
31+
desc: Run Docs dev server with live preview
32+
cmds:
33+
- docker build -t scm-engine-docs -f Dockerfile.docs .
34+
- docker run --rm -it -p 8000:8000 -v ${PWD}:/docs scm-engine-docs serve -o --watch-theme -w /docs --dev-addr 0.0.0.0:8000
35+
36+
docs:deploy:
37+
desc: Deploy GitHub pages docs
38+
cmds:
39+
- docker build -t scm-engine-docs -f Dockerfile.docs .
40+
- docker run --rm -v ${PWD}:/docs scm-engine-docs gh-deploy --force
41+
3042
test:
3143
desc: Run tests
3244
env:

docs/index.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Welcome to MkDocs
2+
3+
For full documentation visit [mkdocs.org](https://www.mkdocs.org).
4+
5+
## Commands
6+
7+
* `mkdocs new [dir-name]` - Create a new project.
8+
* `mkdocs serve` - Start the live-reloading docs server.
9+
* `mkdocs build` - Build the documentation site.
10+
* `mkdocs -h` - Print help message and exit.
11+
12+
## Project layout
13+
14+
mkdocs.yml # The configuration file.
15+
docs/
16+
index.md # The documentation homepage.
17+
... # Other markdown pages, images and other files.

mkdocs.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
site_name: SCM Engine Docs
2+
3+
theme:
4+
name: material

0 commit comments

Comments
 (0)