Files
dusa.cz/.gitea/workflows/deploy.yml
2026-03-11 08:45:10 +01:00

28 lines
582 B
YAML

name: Deploy
on:
push:
branches: [production]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
run: |
if [ -d .git ]; then
git fetch origin production
git reset --hard origin/production
else
git clone --branch production https://git.dusa.cz/vdusa/dusa.cz.git .
fi
- name: Build
run: npm ci && npm run build
- name: Deploy
run: |
mkdir -p /var/www/dusa.cz
rm -rf /var/www/dusa.cz/*
cp -a dist/. /var/www/dusa.cz/