28 lines
582 B
YAML
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/
|