mirror of
https://github.com/semaphoreci/book-cicd-docker-kubernetes.git
synced 2026-02-14 15:59:50 +00:00
Automatic publication
This commit is contained in:
16
.semaphore/pipeline_2.yml
Normal file
16
.semaphore/pipeline_2.yml
Normal 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
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user