Skip to content

Update publish.yml

Update publish.yml #75

Workflow file for this run

name: Publish Website
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: unnecessary
- name: Adding Known Hosts
run: ssh-keyscan -H ${{ secrets.WEB_SERVER_HOST }} >> ~/.ssh/known_hosts
- name: Deploy with rsync
run: rsync -avz --exclude=.github/ --exclude=.git/ -e ssh . ${{ secrets.WEB_SERVER_USERNAME }}@${{ secrets.WEB_SERVER_HOST }}:/home/ydm/resonite
- name: Clear Cloudflare Cache
uses: Cyb3r-Jak3/action-cloudflare-cache@v2.0.0
with:
zone: ${{ secrets.CLOUDFLARE_ZONE_ID }}
api_token: ${{ secrets.CLOUDFLARE_TOKEN }}