Prepare the forgejo action for deployment #1

Open
msz wants to merge 1 commit from action into main

View file

@ -1,16 +1,21 @@
name: Build catalog
on: workflow_dispatch
# todo: also on TBD schedule
jobs:
build:
runs-on: docker
runs-on: site-deploy
# todo: only if specific repository owner?
container:
# todo: runs-on site-deploy (maps to data.forgejo.org/oci/node:20-bookworm)
image: node:20-trixie
volumes:
# for depositing the built site directly
- /home/www/srv:/www:rw
steps:
- name: Checkout
uses: actions/checkout@v4
uses: https://hub.datalad.org/forgejo/datalad-clone-action@v1
with:
get_file_content: false
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
@ -19,12 +24,5 @@ jobs:
run: |
uv run buildpage.py ctlg/
- name: Upload artifact
# todo: replace with a different kind of deposition
uses: actions/upload-artifact@v3-node20
with:
path: ctlg
retention-days: 7
compression-level: 6
overwrite: true
include-hidden-files: true
- name: Deploy
run: mv ctlg /www/new_data.trr379.de && mv /www/data.trr379.de /www/old_data.trr379.de; mv /www/new_data.trr379.de /www/data.trr379.de; rm -rf /www/old_data.trr379.de