Use drone cron for automatic crawl and build (#104)

This commit is contained in:
Nutomic 2022-05-23 19:12:06 +00:00 committed by GitHub
parent 401d4b3ce8
commit 1b5d006cea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 1 deletions

View file

@ -29,6 +29,16 @@ steps:
commands: commands:
- yarn build:dev - 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 - name: make release build and push to docker hub
image: plugins/docker image: plugins/docker
settings: settings:

3
.gitmodules vendored
View file

@ -14,3 +14,6 @@
path = lemmy-js-client path = lemmy-js-client
url = https://github.com/LemmyNet/lemmy-js-client url = https://github.com/LemmyNet/lemmy-js-client
branch = main branch = main
[submodule "lemmy-stats-crawler"]
path = lemmy-stats-crawler
url = https://yerbamate.ml/LemmyNet/lemmy-stats-crawler.git

View file

@ -21,7 +21,7 @@ try {
const run = spawn("cargo", const run = spawn("cargo",
["run", "--", "--start-instances", all_recommended, ["run", "--", "--start-instances", all_recommended,
"--exclude-instances", recommended_instances.exclude], { "--exclude-instances", recommended_instances.exclude], {
cwd: "../lemmy-stats-crawler", cwd: "lemmy-stats-crawler",
encoding : 'utf8' encoding : 'utf8'
}); });
let savedOutput = ''; let savedOutput = '';

1
lemmy-stats-crawler Submodule

@ -0,0 +1 @@
Subproject commit d11febc7e80ae7ea37bd57f00163d71e4b48a918