diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..37197a4 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,47 @@ +kind: pipeline +type: docker +name: default + +steps: + - name: deploy + image: appleboy/drone-ssh + settings: + host: + - 148.135.109.242 + username: root + key: + from_secret: ssh_key + passphrase: + from_secret: ssh_passphrase + port: 22 + command_timeout: 2m + script: + - echo "Go to the project directory" + - cd /root/develop/discord-dota-bot + - echo "Pull the latest code" + - git pull + - echo "Restart service" + - supervisorctl restart dotabot + script_stop: true + + - name: discord notification + image: appleboy/drone-discord + settings: + webhook_id: + from_secret: discord_webhook_id + webhook_token: + from_secret: discord_webhook_token + # message: | + # Drone Build #${DRONE_BUILD_NUMBER} ${DRONE_BUILD_STATUS} + # Project: ${DRONE_REPO_NAME} + # Branch: ${DRONE_BRANCH} + # Commit: ${DRONE_COMMIT_SHA:0:8} + # [Build Log](${DRONE_BUILD_LINK}) + when: + status: [success, failure] + + +volumes: + - name: dockersock + host: + path: /var/run/docker.sock