Created
March 4, 2021 21:12
-
-
Save zachisit/819279198b69c9b912ba36e65642bfd8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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