Add a forgejo deploy action #7

Merged
msz merged 2 commits from forgejodeploy into trunk 2025-05-05 14:54:32 +00:00

View file

@ -0,0 +1,33 @@
name: Deploy on webserver
defaults:
run:
# hugo container only has `sh`
shell: sh
on:
push:
branches:
- trunk
jobs:
deploy:
if: github.repository_owner == "www"
name: Build site with hugo and deploy on success
runs-on: psyinf-hugo-site-build
container:
volumes:
# for depositing the built site directly
- /home/www/srv:/www:rw
steps:
- name: Checkout
uses: https://hub.datalad.org/forgejo/datalad-clone-action@v1
with:
recursive: true
get_file_content: false
- name: Generate site
run: hugo
- name: Deploy
run: cp -r public /www/_rdm.sfb1451.de && rm -rf /www/rdm.sfb1451.de ; mv /www/_rdm.sfb1451.de /www/rdm.sfb1451.de