Skip to content

Commit

Permalink
Automatic publication
Browse files Browse the repository at this point in the history
  • Loading branch information
TomFern committed Aug 12, 2021
1 parent ae881e2 commit 8e9d839
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .semaphore/pipeline_2.yml
@@ -0,0 +1,16 @@
version: v1.0
name: Publish to WordPress
agent:
machine:
type: e1-standard-2
os_image: ubuntu1804
blocks:
- name: SFTP Upload
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:/wp-content/uploads/2020/05/'
secrets:
- name: wordpress-sftp
5 changes: 5 additions & 0 deletions .semaphore/semaphore.yml
Expand Up @@ -33,3 +33,8 @@ blocks:
- 'curl -L https://github.com/w3c/epubcheck/releases/download/v4.2.4/epubcheck-4.2.4.zip -o epubcheck.zip'
- unzip epubcheck.zip
- java -jar epubcheck-4.2.4/epubcheck.jar CICD_with_Docker_Kubernetes_Semaphore.epub
promotions:
- name: Publish
pipeline_file: pipeline_2.yml
auto_promote:
when: branch = 'master' AND result = 'passed'

0 comments on commit 8e9d839

Please sign in to comment.