kind: pipeline
type: docker
name: default

steps:
-   name: compress
    image: node
    commands:
    - npm install uglify-js svgo -g
    - for i in js/*.js; do uglifyjs -c -m -o $i -- $i; done
    - for i in $(find . -name "*.svg"); do svgo $i -o $i; done

-   name: publish
    image: appleboy/drone-scp
    settings:
        host:
        - daihan.me
        user:
            from_secret: user
        key:
            from_secret: ssh_key
        passphrase:
            from_secret: passphrase
        port: 22
        command_timeout: 2m
        target:
                from_secret: path
        source:
        - !./.drone.yml
        - ./*
