clone:
  git:
    image: woodpeckerci/plugin-git:next

pipeline:
  compliance:
    image: node:14
    commands:
      - npm install
      - npm run build
    when:
      event: [pull_request]
  netlify:
    image: node:14
    secrets: [bot_token, netlify_site_id, netlify_auth_token]
    commands:
      - node netlify.js
    when:
      event: [pull_request]
  archive:
    image: jolheiser/drone-arc:latest
    when:
      event: push
      branch: main
    files:
      - "dist/*"
    output: dist.tar.gz
  release:
    image: jolheiser/drone-gitea-main:latest
    when:
      event: push
      branch: main
    secrets:
      - source: gitea_token
        target: plugin_gitea_token
    base: https://git.jojodev.com
    files:
      - "dist.tar.gz"
