2023-04-25 00:00:52 +00:00
|
|
|
#clone:
|
|
|
|
# git:
|
|
|
|
# image: woodpeckerci/plugin-git
|
|
|
|
# settings:
|
|
|
|
# recursive: true
|
|
|
|
# submodule_update_remote: true
|
2021-03-15 17:18:03 +00:00
|
|
|
|
2024-01-28 18:25:26 +00:00
|
|
|
variables:
|
|
|
|
- &install_pnpm "corepack enable pnpm"
|
|
|
|
|
2024-01-10 19:09:59 +00:00
|
|
|
steps:
|
2023-04-25 00:00:52 +00:00
|
|
|
prepare_repo:
|
|
|
|
image: alpine:3
|
|
|
|
commands:
|
|
|
|
- apk add git
|
|
|
|
- git submodule init
|
2024-01-10 19:09:59 +00:00
|
|
|
- git submodule update
|
2023-04-25 00:00:52 +00:00
|
|
|
|
2023-06-08 20:09:25 +00:00
|
|
|
prettier_markdown_check:
|
2023-07-07 14:03:15 +00:00
|
|
|
image: tmknom/prettier:3.0.0
|
2023-06-08 20:09:25 +00:00
|
|
|
commands:
|
2023-10-31 13:31:03 +00:00
|
|
|
- prettier -c . "!dist" "!lemmy-docs" "!lemmy-translations" "!joinlemmy-translations" "!lemmy-js-client" "!lemmy-stats-crawler" "!src/shared/instance_stats.ts" "!src/shared/donation_stats.ts"
|
2023-06-08 20:09:25 +00:00
|
|
|
|
2024-01-28 18:25:26 +00:00
|
|
|
install:
|
2023-10-31 13:31:03 +00:00
|
|
|
image: node:alpine
|
2021-03-15 17:18:03 +00:00
|
|
|
commands:
|
2024-01-28 18:25:26 +00:00
|
|
|
- *install_pnpm
|
|
|
|
- pnpm i
|
2021-03-15 17:18:03 +00:00
|
|
|
|
2024-01-28 18:25:26 +00:00
|
|
|
lint:
|
2023-10-31 13:31:03 +00:00
|
|
|
image: node:alpine
|
2021-03-15 17:18:03 +00:00
|
|
|
commands:
|
2024-01-28 18:25:26 +00:00
|
|
|
- *install_pnpm
|
|
|
|
- pnpm lint
|
2021-03-15 17:18:03 +00:00
|
|
|
|
2024-01-28 18:25:26 +00:00
|
|
|
build_dev:
|
2023-10-31 13:31:03 +00:00
|
|
|
image: node:alpine
|
2021-03-15 17:18:03 +00:00
|
|
|
commands:
|
2024-01-28 18:25:26 +00:00
|
|
|
- *install_pnpm
|
|
|
|
- pnpm prebuild:dev
|
|
|
|
- pnpm build:dev
|
2021-03-15 17:18:03 +00:00
|
|
|
|
2023-03-24 20:42:03 +00:00
|
|
|
nightly_instance_crawl:
|
2023-10-31 13:31:03 +00:00
|
|
|
image: node:alpine
|
2022-05-23 19:12:06 +00:00
|
|
|
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
|
2024-01-28 18:25:26 +00:00
|
|
|
- pnpm crawl
|
2022-05-23 19:12:06 +00:00
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- cron
|
|
|
|
|
2023-03-24 20:42:03 +00:00
|
|
|
nightly_build_and_push_to_docker_hub:
|
2023-04-15 20:11:34 +00:00
|
|
|
image: woodpeckerci/plugin-docker-buildx
|
2021-03-15 17:18:03 +00:00
|
|
|
settings:
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
repo: dessalines/joinlemmy-site
|
2023-04-15 20:11:34 +00:00
|
|
|
tag: latest
|
2021-03-15 17:18:03 +00:00
|
|
|
username:
|
|
|
|
from_secret: docker_username
|
|
|
|
password:
|
|
|
|
from_secret: docker_password
|
|
|
|
when:
|
2022-05-24 13:11:20 +00:00
|
|
|
event:
|
|
|
|
- cron
|
2022-07-22 11:02:38 +00:00
|
|
|
|
2023-03-24 20:42:03 +00:00
|
|
|
release_instance_crawl:
|
2023-10-31 13:31:03 +00:00
|
|
|
image: node:alpine
|
2022-07-22 11:02:38 +00:00
|
|
|
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
|
2024-01-28 18:25:26 +00:00
|
|
|
- pnpm crawl
|
2022-07-22 11:02:38 +00:00
|
|
|
when:
|
2023-03-24 20:42:03 +00:00
|
|
|
event: tag
|
2022-07-22 11:02:38 +00:00
|
|
|
|
2023-03-24 20:42:03 +00:00
|
|
|
release_build_and_push_to_docker_hub:
|
2023-04-15 20:11:34 +00:00
|
|
|
image: woodpeckerci/plugin-docker-buildx
|
2022-07-22 11:02:38 +00:00
|
|
|
settings:
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
repo: dessalines/joinlemmy-site
|
2023-04-15 20:11:34 +00:00
|
|
|
tag: latest
|
2022-07-22 11:02:38 +00:00
|
|
|
username:
|
|
|
|
from_secret: docker_username
|
|
|
|
password:
|
|
|
|
from_secret: docker_password
|
|
|
|
when:
|
2023-03-24 20:42:03 +00:00
|
|
|
event: tag
|
2023-02-12 13:38:54 +00:00
|
|
|
|
2023-03-24 20:42:03 +00:00
|
|
|
notify_on_failure:
|
2023-02-12 13:38:54 +00:00
|
|
|
image: alpine:3
|
2023-06-08 20:09:25 +00:00
|
|
|
commands:
|
2023-02-12 13:38:54 +00:00
|
|
|
- apk add curl
|
|
|
|
- "curl -d'joinlemmy-site build failed: ${DRONE_BUILD_LINK}' ntfy.sh/lemmy_drone_ci"
|
|
|
|
when:
|
|
|
|
status:
|
|
|
|
- failure
|
|
|
|
|
2023-03-24 20:42:03 +00:00
|
|
|
notify_on_tag_deploy:
|
2023-02-12 13:38:54 +00:00
|
|
|
image: alpine:3
|
2023-06-08 20:09:25 +00:00
|
|
|
commands:
|
2023-02-12 13:38:54 +00:00
|
|
|
- apk add curl
|
|
|
|
- "curl -d'joinlemmy-site:${DRONE_TAG} deployed' ntfy.sh/lemmy_drone_ci"
|
|
|
|
when:
|
2023-03-24 20:42:03 +00:00
|
|
|
event: tag
|