diff --git a/.drone.yml b/.drone.yml index 12f5449..e056599 100644 --- a/.drone.yml +++ b/.drone.yml @@ -2,18 +2,18 @@ kind: pipeline name: create_pdf_release steps: - - name: copy_files - image: appleboy/drone-scp + - name: rebuild_cache + image: appleboy/drone-sftp-cache settings: - host: 192.168.10.5 + server: 192.168.10.5 + port: 22 username: thomas password: from_secret: ssh_password - port: 22 - target: /tmp/resumemd - source: config.js - source: Resume.md - source: stylesheet.css + path: /tmp/resumemd + rebuild: true + mount: + - src - name: convert image: appleboy/drone-ssh @@ -25,18 +25,20 @@ steps: port: 22 command_timeout: 2m script: - - /home/thomas/.nvm/versions/node/v17.4.0/bin/node /home/thomas/.nvm/versions/node/v17.4.0/bin/md-to-pdf --stylesheet /tmp/resumemd/stylesheet.css --config-file /tmp/resumemd/config.js /tmp/resumemd/Resume.md + - /home/thomas/.nvm/versions/node/v17.4.0/bin/node /home/thomas/.nvm/versions/node/v17.4.0/bin/md-to-pdf --config-file /tmp/resumemd/config.js /tmp/resumemd/Resume.md - - name: return_pdf - image: appleboy/drone-scp + - name: restore_cache + image: appleboy/drone-sftp-cache settings: - host: 192.168.10.5 + server: 192.168.10.5 + port: 22 username: thomas password: from_secret: ssh_password - port: 22 - source: Resume.pdf - target: ./ + path: /tmp/resumemd + restore: true + mount: + - src - name: gitea_release image: plugins/gitea-release diff --git a/Resume.md b/src/Resume.md similarity index 100% rename from Resume.md rename to src/Resume.md diff --git a/config.js b/src/config.js similarity index 80% rename from config.js rename to src/config.js index 2e5d40a..baed925 100644 --- a/config.js +++ b/src/config.js @@ -1,4 +1,5 @@ module.exports = { + stylesheet: ['stylesheet.css'], pdf_options: { format: 'Letter', margin: '0mm', diff --git a/stylesheet.css b/src/stylesheet.css similarity index 100% rename from stylesheet.css rename to src/stylesheet.css