when:
  - event: push
    branch: main

steps:
  - name: test
    image: golang:1.24
    commands:
      - go test ./...
  - name: build tailwind css
    image: codeberg.org/woodpecker-plugins/node-pm
    commands:
      - cd layout
      - npm install
      - npx @tailwindcss/cli -i style.css -o output.css
  - name: build
    image: golang:1.24
    commands:
      go build ./
  - name: upload
    image: woodpeckerci/plugin-s3
    settings:
      endpoint: https://wikipress.s3.fr-par.scw.cloud
      access_key:
        from_secret: aws_access_key_id
      secret_key:
        from_secret: aws_secret_access_key
      source: wikipress
      target: wikipress
      acl: public-read
      strip_prefix: wikipress/wikipress/
      region: fr-par
      bucket: wikipress
      path_style: true


