Skip to content

Commit eeadd54

Browse files
authored
docs: initial external docs site (#16)
* docs: initial external docs site * ci: change workflow titles * docs: add site/edit url * docs: playing around with formatting * docs: more playing around with naming * fix: merge_request.state must be a string for working with 'in' operator * docs: sync config file * docs: more tuning of docs * docs: split up script attributes and functions * docs: rework things a bit more * docs: generate attributes from source * docs: improve UX * docs: fix label/id for headlines * docs: minor tweaks * docs: expand docs and style it proper * docs: pretty README.md * docs: pretty README.md * docs: pretty README.md * docs: pretty README.md * docs: pretty README.md * ci: only ship docs on main brancH
1 parent c5094ff commit eeadd54

35 files changed

+1389
-734
lines changed

.github/workflows/docs.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
deploy:
13+
name: "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+
- uses: actions/setup-go@v5
24+
with:
25+
go-version-file: go.mod
26+
27+
- name: setup
28+
run: task setup
29+
30+
- name: deploy
31+
run: task docs:deploy

.gitignore

+18-16
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1-
.direnv
2-
.env
3-
.env.*
4-
.idea/
5-
.scm-engine.yml
6-
.task/
7-
3rd-party/
8-
bin/
9-
completions/
10-
coverage.txt
11-
dist/
12-
/schema/ignore
13-
manpages/
14-
scm-engine
15-
scm-engine.exe
161
*.gen.go
17-
!.env.example
2+
/.cache
3+
/.direnv
4+
/.env
5+
/.env.*
6+
/.idea/
7+
/.scm-engine.docs.yml
8+
/.scm-engine.yml
9+
/.task/
10+
/3rd-party/
11+
/bin/
12+
/completions/
13+
/coverage.txt
14+
/dist/
15+
/manpages/
16+
/schema/ignore
17+
/scm-engine
18+
/scm-engine.exe
19+
/docs/gitlab/script-attributes.md

.markdownlint.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
MD046: false
2+
MD013: false
3+
MD051: false

.scm-engine.example.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
actions:
44
- name: Warn if the Merge Request haven't had commit activity for 21 days and will be closed
5-
if: |
6-
merge_request.state != "closed"
5+
if: |1
6+
merge_request.state != "closed"
77
&& merge_request.time_since_last_commit > duration("21d")
88
&& merge_request.time_since_last_commit < duration("28d")
99
&& not merge_request.has_label("do-not-close")
@@ -18,8 +18,8 @@ actions:
1818
To disable this behavior, add the `do-not-close` label to the Merge Request in the right menu or add a comment with `/label ~"do-not-close"`.
1919
2020
- name: Close the Merge Request if it haven't had commit activity for 28 days
21-
if: |
22-
merge_request.state != "closed"
21+
if: |1
22+
merge_request.state != "closed"
2323
&& merge_request.time_since_last_commit > duration("28d")
2424
&& not merge_request.has_label("do-not-close")
2525
then:
@@ -34,8 +34,8 @@ actions:
3434
To disable this behavior, add the `do-not-close` label to the Merge Request in the right menu or add a comment with `/label ~"do-not-close"`.
3535
3636
- name: Approve MR if the 'break-glass-approve' label is configured
37-
if: |
38-
merge_request.state != "closed"
37+
if: |1
38+
merge_request.state != "closed"
3939
&& not merge_request.approved
4040
&& merge_request.has_label("break-glass-approve")
4141
then:

.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

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM squidfunk/mkdocs-material
2+
3+
# https://github.com/lukasgeiter/mkdocs-awesome-pages-plugin
4+
RUN pip install mkdocs-awesome-pages-plugin
5+
RUN pip install mkdocs-git-revision-date-localized-plugin
6+
RUN pip install mkdocs-git-authors-plugin

0 commit comments

Comments
 (0)