serene/.woodpecker/docs.yml

65 lines
1.7 KiB
YAML

pipeline:
build:
image: woodpeckerci/plugin-docker-buildx
secrets: [docker_username, docker_password]
settings:
repo: serenelang/serene-docs
registry: docker.io
dockerfile: docs/Dockerfile
tags: latest
username:
from_secret: docker_username
password:
from_secret: docker_password
when:
- path:
include: [ 'mkdocs.yml', 'docs/**' ]
- branch: master
deploy:
image: docker:24.0.2-cli-alpine3.18
commands:
- docker stack deploy -c docs/service.yml serene-docs --prune
volumes:
- /var/run/docker.sock:/var/run/docker.sock
when:
- path:
include: [ 'mkdocs.yml', 'docs/**' ]
# ignore_message: "[ALL]"
- branch: master
ChatNotify:
image: lxsameer/notify:3
settings:
matrix_room_id:
from_secret: matrix_room
matrix_access_token:
from_secret: matrix_token
matrix_user:
from_secret: matrix_user
matrix_msg: "[${CI_REPO}][Docs] Job #${CI_BUILD_NUMBER} <b>failed</b> for branch <b>${CI_COMMIT_BRANCH}</b>. ${CI_BUILD_LINK}"
secrets: [ matrix_room, matrix_token, matrix_user ]
when:
- status: [failure]
MailNotify:
image: lxsameer/woodpecker_mailer:4
settings:
from: ci@serene-lang.org
user:
from_secret: mailer_user
password:
from_secret: mailer_password
to: ${CI_COMMIT_AUTHOR_EMAIL}
subject: "[${CI_REPO}][Docs] JOB #${CI_BUILD_NUMBER} failed for branch '${CI_COMMIT_BRANCH}'."
text: |
BUILD: ${CI_BUILD_LINK}
COMMIT: ${CI_COMMIT_LINK}
when:
- status: [failure]
secrets: [ mail_pass, mail_user ]