108 lines
4.1 KiB
YAML
108 lines
4.1 KiB
YAML
name: 'Deploy Cloudflare Worker to celld'
|
|
description: 'Bundles a Cloudflare Worker / Durable Objects project (wrangler.json) and deploys it to a self-hosted celld fleet backed by RustFS S3 and TrueNAS Docker Ingress.'
|
|
inputs:
|
|
ssh_key:
|
|
description: 'Private SSH key for authenticating to TrueNAS SCALE'
|
|
required: true
|
|
s3_access_key:
|
|
description: 'S3 Access Key ID for the celld fleet bucket (defaults to CELLD_S3_ACCESS_KEY)'
|
|
required: true
|
|
s3_secret_key:
|
|
description: 'S3 Secret Access Key for the celld fleet bucket (defaults to CELLD_S3_SECRET_KEY)'
|
|
required: true
|
|
working_directory:
|
|
description: 'Path to the Wrangler project directory containing wrangler.json / wrangler.toml'
|
|
required: false
|
|
default: '.'
|
|
app_name:
|
|
description: 'Application subpath under /mnt/jupiter/apps/<owner>/<repo> (defaults to <owner>/<repo>)'
|
|
required: false
|
|
default: ''
|
|
bucket:
|
|
description: 'S3 bucket name for the celld fleet (defaults to celld-<repo-name>)'
|
|
required: false
|
|
default: ''
|
|
domain:
|
|
description: 'Target domain(s) for Traefik router, comma-separated (defaults to <repo-name>.rodydavis.dev)'
|
|
required: false
|
|
default: ''
|
|
s3_endpoint:
|
|
description: 'External S3 endpoint used by the CI runner during celld deploy'
|
|
required: false
|
|
default: 'https://s3.rodydavis.dev'
|
|
internal_s3_endpoint:
|
|
description: 'Internal S3 endpoint used by the celld container on TrueNAS over apps-net'
|
|
required: false
|
|
default: 'http://minio-s3:9000'
|
|
s3_region:
|
|
description: 'S3 bucket region'
|
|
required: false
|
|
default: 'us-east-1'
|
|
d1_database:
|
|
description: 'Optional D1 database name to automatically apply migrations for (celld d1 migrations apply)'
|
|
required: false
|
|
default: ''
|
|
env_file_content:
|
|
description: 'Optional additional environment variables to append to the TrueNAS .env file'
|
|
required: false
|
|
default: ''
|
|
idle_evict_s:
|
|
description: 'Seconds before idle Durable Object cells hibernate from memory (CELLD_IDLE_EVICT_S)'
|
|
required: false
|
|
default: '60'
|
|
ltx_retention_secs:
|
|
description: 'Seconds to retain superseded LTX SQLite epoch logs before garbage collection (CELLD_LTX_RETENTION_SECS)'
|
|
required: false
|
|
default: '86400'
|
|
deploy_poll_s:
|
|
description: 'Seconds between bucket deployment pointer checks on the celld node (CELLD_DEPLOY_POLL_S)'
|
|
required: false
|
|
default: '5'
|
|
host:
|
|
description: 'TrueNAS SSH host IP or domain'
|
|
required: false
|
|
default: '10.0.0.218'
|
|
user:
|
|
description: 'TrueNAS SSH user'
|
|
required: false
|
|
default: 'root'
|
|
network:
|
|
description: 'Docker external network name for Traefik ingress'
|
|
required: false
|
|
default: 'apps-net'
|
|
traefik_entrypoints:
|
|
description: 'Traefik entrypoint (e.g. web)'
|
|
required: false
|
|
default: 'web'
|
|
|
|
runs:
|
|
using: 'composite'
|
|
steps:
|
|
- name: Deploy Worker Bundle and Ensure celld Fleet on TrueNAS
|
|
shell: bash
|
|
env:
|
|
INPUT_SSH_KEY: ${{ inputs.ssh_key }}
|
|
INPUT_S3_ACCESS_KEY: ${{ inputs.s3_access_key }}
|
|
INPUT_S3_SECRET_KEY: ${{ inputs.s3_secret_key }}
|
|
INPUT_WORKING_DIRECTORY: ${{ inputs.working_directory }}
|
|
INPUT_APP_NAME: ${{ inputs.app_name }}
|
|
INPUT_BUCKET: ${{ inputs.bucket }}
|
|
INPUT_DOMAIN: ${{ inputs.domain }}
|
|
INPUT_S3_ENDPOINT: ${{ inputs.s3_endpoint }}
|
|
INPUT_INTERNAL_S3_ENDPOINT: ${{ inputs.internal_s3_endpoint }}
|
|
INPUT_S3_REGION: ${{ inputs.s3_region }}
|
|
INPUT_D1_DATABASE: ${{ inputs.d1_database }}
|
|
INPUT_ENV_CONTENT: ${{ inputs.env_file_content }}
|
|
INPUT_IDLE_EVICT_S: ${{ inputs.idle_evict_s }}
|
|
INPUT_LTX_RETENTION_SECS: ${{ inputs.ltx_retention_secs }}
|
|
INPUT_DEPLOY_POLL_S: ${{ inputs.deploy_poll_s }}
|
|
INPUT_HOST: ${{ inputs.host }}
|
|
INPUT_USER: ${{ inputs.user }}
|
|
INPUT_NETWORK: ${{ inputs.network }}
|
|
INPUT_ENTRYPOINTS: ${{ inputs.traefik_entrypoints }}
|
|
REPO_FULL_NAME: ${{ github.repository }}
|
|
REPO_OWNER: ${{ github.repository_owner }}
|
|
REPO_NAME: ${{ github.event.repository.name }}
|
|
run: |
|
|
bash "${{ github.action_path }}/deploy.sh"
|