Skip to content

Merge pull request #58 from happyprime/repo-sync/projects/default #3

Merge pull request #58 from happyprime/repo-sync/projects/default

Merge pull request #58 from happyprime/repo-sync/projects/default #3

Workflow file for this run

name: Happy Prime Production Deployment
on:
push:
branches: [ trunk ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Deploy to server
if: success()
uses: easingthemes/ssh-deploy@v4
env:
SSH_PRIVATE_KEY: ${{ secrets.KINSTA_SSH_KEY }}
ARGS: "-rltgoDzvO --exclude-from=.deploy_ignore --delete"
SOURCE: "./"
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
REMOTE_PORT: ${{ secrets.REMOTE_PORT }}
TARGET: ${{ secrets.REMOTE_TARGET }}
- name: Successful deployment Slack notification
if: success()
uses: wearerequired/slack-messaging-action@v2
with:
bot_token: ${{ secrets.SLACK_BOT_TOKEN }}
channel: project-happyprimeweb
payload: >-
{
"icon_emoji": ":shipit:",
"username": "Happy Prime Deployment: ${{ github.event.sender.login }}",
"text": ":white_check_mark: Deployment from the <https://github.com/${{ github.repository }}|${{ github.repository }}> `trunk` branch to https://happyprime.co complete."
}
- name: Deployment failed Slack notification
if: failure()
uses: wearerequired/slack-messaging-action@v2
with:
bot_token: ${{ secrets.SLACK_BOT_TOKEN }}
channel: project-happyprimeweb
payload: >-
{
"icon_emoji": ":shipit:",
"username": "Happy Prime Deployment: ${{ github.event.sender.login }}",
"text": ":large_red_square: Deployment from the <https://github.com/${{ github.repository }}|${{ github.repository }}> `trunk` branch to https://happyprime.co failed."
}