kiste.abcd-j.de-ui/.forgejo/workflows/deploy.yml

33 lines
850 B
YAML

name: Deploy on webserver
on:
push:
branches:
- main
jobs:
deploy:
if: forgejo.repository == 'www/kiste.abcd-j.de-ui'
name: Build site and deploy
runs-on: site-deploy
container:
volumes:
# for depositing the built site directly
- /home/www/srv:/www:rw
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Build
run: make install build
- name: Package
run: |
# we need to have the editor served from a `ui/` path
mkdir deploy
mv dist deploy/ui
- name: Deploy
run: cp -r deploy /www/kiste.abcd-j.de-new && (test -d && mv /www/kiste.abcd-j.de /www/kiste.abcd-j.de-old || true); mv /www/kiste.abcd-j.de-new /www/kiste.abcd-j.de; rm -rf /www/kiste.abcd-j.de-old