Skip to content

Update kavithai

Update kavithai #116

Workflow file for this run

name: Publish on Server
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Setup Deno environment
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Setup Cache
uses: actions/checkout@v4
with:
path: |
~/.deno
~/.cache/deno
key: ${{ runner.os }}-deno-${{ hashFiles('**/_config.ts', '**/import_map.json') }}
- name: Build site
run: |
deno task build --location=https://kavithai.site
- 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 -p ${{ secrets.SSH_PORT}} -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
- name: Deploy with rsync
run: rsync -avr --rsh="ssh -p ${{ secrets.SSH_PORT }}" --delete-after --delete-excluded _site/ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/var/www/copied-kavithai/_site