Skip to content

Commit c580420

Browse files
committed
👷 Add readthedocs CI
1 parent 963bf91 commit c580420

File tree

6 files changed

+47
-4
lines changed

6 files changed

+47
-4
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ repos:
5353
hooks:
5454
- id: yamllint
5555
- repo: https://github.com/executablebooks/mdformat
56-
rev: 0.7.18
56+
rev: 0.7.19
5757
hooks:
5858
- id: mdformat
5959
additional_dependencies:
@@ -67,7 +67,7 @@ repos:
6767
- mdformat-config
6868
- mdformat-web
6969
- repo: https://github.com/DavidAnson/markdownlint-cli2
70-
rev: v0.15.0
70+
rev: v0.16.0
7171
hooks:
7272
- id: markdownlint-cli2
7373
additional_dependencies:

.readthedocs.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# https://docs.readthedocs.io/en/stable/config-file/v2.html
2+
---
3+
version: 2
4+
5+
build:
6+
os: ubuntu-22.04
7+
tools:
8+
python: "3"
9+
commands:
10+
- pip install hererocks
11+
- hererocks ~/lua -l5.1 -rlatest
12+
- scripts/ldoc.sh

code-stats.nvim-scm-1.rockspec

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,14 @@ end
3333

3434
build = {
3535
type = 'builtin',
36-
copy_directories = { 'plugin', 'assets', 'scripts' } ,
36+
copy_directories = { 'plugin', 'assets' } ,
37+
install = {
38+
conf = {
39+
['..'] = 'shell.nix',
40+
['../scripts/update.sh'] = 'scripts/update.sh',
41+
['../scripts/get-OPENSSL_INCDIR.nix'] = 'scripts/get-OPENSSL_INCDIR.nix',
42+
['../scripts/get-OPENSSL_LIBDIR.nix'] = 'scripts/get-OPENSSL_LIBDIR.nix',
43+
['../scripts/get-STDCPP_LIBDIR.nix'] = 'scripts/get-STDCPP_LIBDIR.nix',
44+
},
45+
},
3746
}

config.ld

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---ldoc config
2+
-- luacheck: ignore 111
3+
---@diagnostic disable: lowercase-global
4+
project = "ime.nvim"
5+
readme = "README.md"
6+
format = "cmark"
7+
dir = "_readthedocs/html"

scripts/ldoc.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
cd "$(dirname "$(dirname "$(readlink -f "$0")")")"
4+
5+
. ~/lua/bin/activate &&
6+
luarocks install ldoc &&
7+
ldoc .

shell.nix

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1-
{ pkgs ? import <nixpkgs> { } }:
1+
{
2+
pkgs ? import <nixpkgs> { },
3+
}:
24

35
with pkgs;
46
mkShell {
57
name = "code-stats.nvim";
68
buildInputs = [
79
stdenv.cc
810
openssl
11+
(luajit.withPackages (
12+
p: with p; [
13+
busted
14+
ldoc
15+
]
16+
))
917
];
1018
}

0 commit comments

Comments
 (0)