Update test.yml to run test on main and dev #36
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: Deploys, everything has already been tested | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: | |
- closed | |
jobs: | |
deploy: | |
if: github.event_name == 'pull_request' && github.event.pull_request.merged | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
- name: Connect to server and trigger update | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USERNAME }} | |
key: ${{ secrets.KEY }} | |
script: | | |
sudo /root/deploy.sh production |