Skip to content

Merge pull request #147 from SW13-Monstera/dev #42

Merge pull request #147 from SW13-Monstera/dev

Merge pull request #147 from SW13-Monstera/dev #42

Workflow file for this run

name: Deploy to prod env
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
with:
token: ${{ secrets.PRIVATE_TOKEN }}
submodules: true
- name: Build and deploy
run: |
sudo apt-get install sshpass
sshpass -p$SSH_PRIVATE_KEY ssh -o StrictHostKeyChecking=no $SSH_USER@$SSH_KNOWN_HOSTS '~/build.sh'
env:
SSH_PRIVATE_KEY: ${{secrets.SSH_PRIVATE_KEY}}
SSH_USER: ${{secrets.SSH_USER}}
SSH_KNOWN_HOSTS: ${{secrets.SSH_KNOWN_HOSTS}}
- name: slack-notification
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
author_name: Github Action Test # default: 8398a7@action-slack
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
if: always() # Pick up events even if the job fails or is canceled.