diff --git a/.drone.yml b/.drone.yml index 81776dc..57321dc 100644 --- a/.drone.yml +++ b/.drone.yml @@ -29,6 +29,16 @@ steps: commands: - yarn build:dev + - name: run instance crawl + image: node:14-alpine + commands: + # libpq and openssl can probably be removed after lemmy dep is upgraded to 0.16.4+ + - apk add cargo pkgconfig openssl openssl-dev libpq libpq-dev + - yarn crawl + when: + event: + - cron + - name: make release build and push to docker hub image: plugins/docker settings: diff --git a/.gitmodules b/.gitmodules index 4d5221e..aeb7abe 100644 --- a/.gitmodules +++ b/.gitmodules @@ -14,3 +14,6 @@ path = lemmy-js-client url = https://github.com/LemmyNet/lemmy-js-client branch = main +[submodule "lemmy-stats-crawler"] + path = lemmy-stats-crawler + url = https://yerbamate.ml/LemmyNet/lemmy-stats-crawler.git diff --git a/crawl.mjs b/crawl.mjs index 3d5a46a..b3e2680 100644 --- a/crawl.mjs +++ b/crawl.mjs @@ -21,7 +21,7 @@ try { const run = spawn("cargo", ["run", "--", "--start-instances", all_recommended, "--exclude-instances", recommended_instances.exclude], { - cwd: "../lemmy-stats-crawler", + cwd: "lemmy-stats-crawler", encoding : 'utf8' }); let savedOutput = ''; diff --git a/lemmy-stats-crawler b/lemmy-stats-crawler new file mode 160000 index 0000000..d11febc --- /dev/null +++ b/lemmy-stats-crawler @@ -0,0 +1 @@ +Subproject commit d11febc7e80ae7ea37bd57f00163d71e4b48a918