Automatic publication

This commit is contained in:
TomFern
2021-08-12 20:08:25 +00:00
parent ae881e26d6
commit 8e9d839e38
2 changed files with 21 additions and 0 deletions

16
.semaphore/pipeline_2.yml Normal file
View File

@@ -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

View File

@@ -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'