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