Skip to content

Instantly share code, notes, and snippets.

@Starmel
Created March 30, 2019 16:06
Show Gist options
  • Save Starmel/bfd41db5a31e3fa46206c06e3841333d to your computer and use it in GitHub Desktop.
Save Starmel/bfd41db5a31e3fa46206c06e3841333d to your computer and use it in GitHub Desktop.
stages:
- deploy
- notification
.send-mt-notification: &send-mt-notification |
curl -X POST \
$WEBHOOK_URL \
-H 'Content-Type: application/json' \
-d "{
\"channel\": \"town-square\",
\"username\": \"Documentation\",
\"icon_url\": \"https://iconutopia.com/wp-content/uploads/2016/06/rocket-book.png\",
\"text\": \"**Обновлена документация** - <|открыть>\n\nСписок последних изменений:\n$(git log --pretty=format:%s | grep -Eo '[А-Яа-яЁё]+.+' | tail -n 5)\"
}"
pages:
stage: deploy
script:
- docker build -t mkdocs-builder .
- docker run -v $(pwd)/public:/workdir/site -v $(pwd)/mkdocs:/workdir --rm mkdocs-builder mkdocs build -v
artifacts:
paths:
- public
only:
- production
tags:
- docker-shell
mattermost notification:
stage: notification
script:
- *send-mt-notification
when: manual
tags:
- docker-shell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment