Skip to content

Commit

Permalink
👷 Add readthedocs CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Dec 12, 2024
1 parent 963bf91 commit c580420
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ repos:
hooks:
- id: yamllint
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.18
rev: 0.7.19
hooks:
- id: mdformat
additional_dependencies:
Expand All @@ -67,7 +67,7 @@ repos:
- mdformat-config
- mdformat-web
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.15.0
rev: v0.16.0
hooks:
- id: markdownlint-cli2
additional_dependencies:
Expand Down
12 changes: 12 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# https://docs.readthedocs.io/en/stable/config-file/v2.html
---
version: 2

build:
os: ubuntu-22.04
tools:
python: "3"
commands:
- pip install hererocks
- hererocks ~/lua -l5.1 -rlatest
- scripts/ldoc.sh
11 changes: 10 additions & 1 deletion code-stats.nvim-scm-1.rockspec
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,14 @@ end

build = {
type = 'builtin',
copy_directories = { 'plugin', 'assets', 'scripts' } ,
copy_directories = { 'plugin', 'assets' } ,
install = {
conf = {
['..'] = 'shell.nix',
['../scripts/update.sh'] = 'scripts/update.sh',
['../scripts/get-OPENSSL_INCDIR.nix'] = 'scripts/get-OPENSSL_INCDIR.nix',
['../scripts/get-OPENSSL_LIBDIR.nix'] = 'scripts/get-OPENSSL_LIBDIR.nix',
['../scripts/get-STDCPP_LIBDIR.nix'] = 'scripts/get-STDCPP_LIBDIR.nix',
},
},
}
7 changes: 7 additions & 0 deletions config.ld
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---ldoc config
-- luacheck: ignore 111
---@diagnostic disable: lowercase-global
project = "ime.nvim"
readme = "README.md"
format = "cmark"
dir = "_readthedocs/html"
7 changes: 7 additions & 0 deletions scripts/ldoc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -e
cd "$(dirname "$(dirname "$(readlink -f "$0")")")"

. ~/lua/bin/activate &&
luarocks install ldoc &&
ldoc .
10 changes: 9 additions & 1 deletion shell.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
{ pkgs ? import <nixpkgs> { } }:
{
pkgs ? import <nixpkgs> { },
}:

with pkgs;
mkShell {
name = "code-stats.nvim";
buildInputs = [
stdenv.cc
openssl
(luajit.withPackages (
p: with p; [
busted
ldoc
]
))
];
}

0 comments on commit c580420

Please sign in to comment.