book-cicd-docker-kubernetes
book-cicd-docker-kubernetes copied to clipboard
feat: upload EPUB & MOBI too
CI/CD workflow should upload all generated artifacts.
Download webpage talks about book also exists in EPUB & MOBI formats.
So... add to promoted pipeline two more task in charge to upload both files, assuming same folder where PDF is hosted.
Improves semaphoreci/book-cicd-docker-kubernetes#10 (https://github.com/semaphoreci/book-cicd-docker-kubernetes/pull/10/commits/8e9d839e3833ec429870c22aa576c51859fbc145) adding semaphoreci/book-cicd-docker-kubernetes#6 build task
Let me know if an env_var
is needed to improve as:
task:
jobs:
- name: Upload PDF
commands:
- artifact pull workflow CICD_with_Docker_Kubernetes_Semaphore.pdf
- 'echo "put CICD_with_Docker_Kubernetes_Semaphore.pdf" | sshpass -p "$FTP_PASSWORD" sftp -P $FTP_PORT -o StrictHostKeyChecking=no $FTP_USER@$FTP_HOST:$FTP_FOLDER'
- name: Upload EPUB
commands:
- artifact pull workflow CICD_with_Docker_Kubernetes_Semaphore.epub
- 'echo "put CICD_with_Docker_Kubernetes_Semaphore.epub" | sshpass -p "$FTP_PASSWORD" sftp -P $FTP_PORT -o StrictHostKeyChecking=no $FTP_USER@$FTP_HOST:$FTP_FOLDER'
- name: Upload MOBI
commands:
- artifact pull workflow CICD_with_Docker_Kubernetes_Semaphore.mobi
- 'echo "put CICD_with_Docker_Kubernetes_Semaphore.mobi" | sshpass -p "$FTP_PASSWORD" sftp -P $FTP_PORT -o StrictHostKeyChecking=no $FTP_USER@$FTP_HOST:$FTP_FOLDER'
env_vars:
- name: FTP_FOLDER
value: "/wp-content/uploads/2020/05/"
secrets:
- name: wordpress-sftp
:bulb: FTP_FOLDER
env_var could be moved to sftp secret store and then obfuscate all external config completely.
And... what about publish the HTML front-matter version too?