functional forgejo CI
All checks were successful
/ deploy (push) Successful in 24s

This commit is contained in:
Daniel Fichtinger 2025-07-13 01:27:56 -04:00
parent 80844ce349
commit d7f20cd07d

View file

@ -1,33 +1,41 @@
on: [push]
on:
push:
branches:
- main
jobs:
deploy:
runs-on: docker
container:
image: python:3.12-slim
image: node:alpine
env:
ZONA: https://git.ficd.sh/ficd/zona.git
site: ficd.sh
site_draft: draft.ficd.sh
steps:
- name: Install uv
- name: Install dependencies
run: |
apt-get update && \
apt-get install -y curl ca-certificates && \
curl -LsSf https://astral.sh/uv/install.sh | bash
- name: Install git
run: |
apt-get update && apt-get install -y git
- name: Install hut
run: |
apt-get update && apt-get install -y hut
- name: Install node
run: |
apt-get update && apt-get install -y curl gnupg ca-certificates && \
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y nodejs
apk add --no-cache coreutils uv hut git
- uses: actions/checkout@v4
# - name: Configure hut
# run: |
# apk add hut
# echo ${{ secrets.HUT }} | hut init
- name: Build
- name: build
run: |
cd $GITHUB_WORKSPACE
uv run --with "https://git.ficd.sh/ficd/zona.git" zona build --output public
ls public
uvx "$ZONA" build --output public
- name: package
run: |
cd $GITHUB_WORKSPACE/public
tar -cvz . > ../public.tar.gz
- name: build draft
run: |
cd $GITHUB_WORKSPACE
uvx "$ZONA" build --output public-draft --draft
- name: package draft
run: |
cd $GITHUB_WORKSPACE/public-draft
tar -cvz . > ../public-draft.tar.gz
- name: authenticate hut
run: |
echo "${{ secrets.HUT_TOKEN }}" | hut init >/dev/null
- name: deploy main
run: hut pages publish -d "$site" "$GITHUB_WORKSPACE/public.tar.gz"
- name: deploy draft
run: hut pages publish -d "$site" "$GITHUB_WORKSPACE/public-draft.tar.gz"