diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..556c6c0 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,72 @@ +--- +kind: pipeline +type: docker +name: docs + +platform: + os: linux + arch: arm64 + +trigger: + event: + - push + - tag + - pull_request + +steps: + - name: build-docs + image: golang:1.20 + commands: + - make trans-copy clean build + + - name: publish-docs + image: techknowlogick/drone-netlify:latest + pull: always + settings: + path: public/ + site_id: d2260bae-7861-4c02-8646-8f6440b12672 + environment: + NETLIFY_TOKEN: + from_secret: netlify_token + when: + branch: + - main + event: + - push + +--- +kind: pipeline +type: docker +name: notifications + +platform: + os: linux + arch: arm64 + +clone: + disable: true + +trigger: + branch: + - main + - "release/*" + event: + - push + - tag + status: + - success + - failure + +depends_on: + - docs + +steps: + - name: discord + image: appleboy/drone-discord:1.2.4 + pull: always + settings: + message: "{{#success build.status}} āœ… Build #{{build.number}} of `{{repo.name}}` succeeded.\n\nšŸ“ Commit by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\n🌐 {{ build.link }} {{else}} āŒ Build #{{build.number}} of `{{repo.name}}` failed.\n\nšŸ“ Commit by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\n🌐 {{ build.link }} {{/success}}\n" + webhook_id: + from_secret: discord_webhook_id + webhook_token: + from_secret: discord_webhook_token