Build, test and deploy website (if needed) #31
Workflow file for this run
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: 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 |