Skip to content

Build, test and deploy website (if needed) #11

Build, test and deploy website (if needed)

Build, test and deploy website (if needed) #11

name: build_test_deploy
run-name: Build, test and deploy website (if needed)
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: rsync deploy
uses: burnett01/[email protected]
if: ${{ github.ref == 'refs/heads/main' }}
with:
switches: -avzr
path: deploy/.
remote_path: htdocs/divd-club
remote_host: ${{ secrets.DEPLOY_HOST }}
remote_user: ${{ secrets.DEPLOY_USER }}
remote_key: ${{ secrets.DEPLOY_KEY }}
# - name: Slack notify failure
# if: failure()
# uses: voxmedia/github-action-slack-notify-build@v1
# env:
# SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
# with:
# channel: website
# status: FAILED
# color: danger