lua.re/.gitea/workflows/push.yaml

29 lines
545 B
YAML
Raw Normal View History

2024-12-03 18:08:24 +11:00
name: Deploy website
on:
push:
branches:
- master
jobs:
deploy:
runs-on: luare
2024-12-03 18:15:20 +11:00
env:
DEPLOY_HOST: lilac.a.lua.re
2024-12-03 18:08:24 +11:00
steps:
2024-12-03 18:15:20 +11:00
- name: Checkout
uses: actions/checkout@v4
- name: Build project
2024-12-03 18:23:07 +11:00
run: |
pnpm install
pnpm build
2024-12-03 18:15:20 +11:00
- name: Deploy to server
2024-12-03 18:08:24 +11:00
run: |
eval "$(ssh-agent -s)"
trap 'eval $(ssh-agent -k)' EXIT
ssh-add - <<< "${{ secrets.SSH_KEY }}"
2024-12-03 18:15:20 +11:00
rsync -avzh --delete 'dist/' 'caddy@$DEPLOY_HOST:sites/lua.re/'