Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
name: Deploy to Vapor
on:
push:
branches:
- vapor-deploy
jobs:
vapor-deploy:
runs-on: ubuntu-latest
steps:
- name: Send started notification to Slack
uses: voxmedia/github-action-slack-notify-build@v1
id: slack
with:
channel: client-name-notification
status: STARTED
color: warning
env: SLACK_BOT_TOKEN: ${{ secrets.SLACK_ACTIONS_NOTIFIER_BOT_TOKEN }}
- name: Install dependencies
uses: actions/checkout@v1
run: composer install --prefer-dist --no-progress --no-suggest
- name: Deploy to Vapor
env: VAPOR_API_TOKEN: ${{ secrets.VAPOR_API_TOKEN }}
run: vendor/bin/vapor deploy staging --commit="${{ github.sha }}"
- name: Send failed notification to Slack
uses: voxmedia/github-action-slack-notify-build@v1
if: failure()
with:
message_id: ${{ steps.slack.outputs.message_id }}
channel: client-name-notification
status: FAILED
color: danger
env: SLACK_BOT_TOKEN: ${{ secrets.SLACK_ACTIONS_NOTIFIER_BOT_TOKEN }}
- name: Send success notification to Slack
uses: voxmedia/github-action-slack-notify-build@v1
if: success()
with:
message_id: ${{ steps.slack.outputs.message_id }}
channel: client-name-notification
status: SUCCESS
color: good
env: SLACK_BOT_TOKEN: ${{ secrets.SLACK_ACTIONS_NOTIFIER_BOT_TOKEN }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment