---
kind: pipeline
type: docker
name: default

steps:
  - name: build
    image: plugins/hugo
    settings:
      hugo_version: 0.69.2
      output: public
      validate: true
  - name: archive
    image: alpine
    commands:
      - cd public
      - tar -czvf ../website-${DRONE_TAG}.tar.gz .
    when:
      event: tag
  - name: release
    image: plugins/gitea-release
    settings:
      base_url: https://git.paulbsd.com
      api_key:
        from_secret: gitea_token
      files: "*.tar.gz"
      checksum:
        - sha256
        - sha512
    when:
      event: tag
