kiste.abcd-j.de-ui/.forgejo/workflows/deploy.yml
2026-06-03 10:57:51 +02:00

31 lines
752 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 all
- name: Test built files
run: |
find dist
- name: Deploy
run: cp -r dist /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