ci: use exec runner

This commit is contained in:
Bruno BELANYI 2021-08-08 20:01:11 +02:00
parent 083f985888
commit 16750e7161

View file

@ -1,48 +1,50 @@
kind: pipeline kind: pipeline
type: exec
name: deploy CV name: deploy CV
steps: steps:
- name: build - name: build
image: aergus/latex commands:
pull: always - nix develop -c make
commands:
- make
- name: deploy - name: deploy
image: appleboy/drone-scp commands:
settings: - nix run github:ambroisie/nix-config#drone-scp
source: /drone/src/*.pdf environment:
strip_components: 2 # Make sure the tarball doesn't contain leading path SCP_SOURCE: /drone/src/*.pdf
rm: true # Make sure only the newly generated files are left SCP_STRIP_COMPONENTS: 2 # Make sure the tarball doesn't contain leading path
host: SCP_RM: true # Make sure only the newly generated files are left
from_secret: ssh_host SCP_HOST:
target: from_secret: ssh_host
from_secret: ssh_target SCP_TARGET:
username: from_secret: ssh_target
from_secret: ssh_user SCP_USERNAME:
key: from_secret: ssh_user
from_secret: ssh_key SCP_KEY:
port: from_secret: ssh_key
from_secret: ssh_port SCP_PORT:
when: from_secret: ssh_port
branch: when:
- main branch:
event: - main
exclude: event:
- pull_request exclude:
- pull_request
- name: notify
image: plugins/matrix - name: notifiy
settings: commands:
homeserver: - nix run github:ambroisie/matrix-notifier
from_secret: matrix_homeserver environment:
roomid: ADDRESS:
from_secret: matrix_roomid from_secret: matrix_homeserver
username: ROOM:
from_secret: matrix_username from_secret: matrix_roomid
password: USER:
from_secret: matrix_password from_secret: matrix_username
trigger: PASS:
status: from_secret: matrix_password
- failure when:
- success status:
- failure
- success