Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upload EPUB & MOBI too #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

davorpa
Copy link

@davorpa davorpa commented Nov 5, 2021

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 #10 (8e9d839) adding #6 build task

CI/CD workflow should upload all generated artifacts. 

Download webpage talks about book also exists in EPUB & MOBI formats.

So... add two more promoted pipeline tasks in charge to upload both files, assuming same folder where PDF is hosted.

Improves semaphoreci#10 adding semaphoreci#6 build task
@davorpa
Copy link
Author

davorpa commented Nov 5, 2021

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

💡 FTP_FOLDER env_var could be moved to sftp secret store and then obfuscate all external config completely.

@davorpa davorpa marked this pull request as ready for review November 5, 2021 20:15
@davorpa
Copy link
Author

davorpa commented Nov 5, 2021

And... what about publish the HTML front-matter version too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant