Skip to content

sets up events feature #61

sets up events feature

sets up events feature #61

name: Deploy to Staging
on:
push:
branches:
- staging
workflow_dispatch:
env:
REMOTE_DIR: ./public_html/staging.wikitongues.org/
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install rsync
run: sudo apt-get install -y rsync
- name: Setup SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Add server to known hosts
run: ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
- name: Deploy via rsync
run: rsync -avz -e "ssh -o StrictHostKeyChecking=no" --filter='merge .rsync-filter' . ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }}:${{ env.REMOTE_DIR }}
- name: Clean up known hosts
run: rm -f ~/.ssh/known_hosts