UMBRA/.gitea/workflows/deploy.yml
Kyle Pope 1f34da9199
Some checks failed
Build and Deploy UMBRA / build-and-deploy (push) Failing after 11m16s
Fix CI/CD checkout failure + enlarge panel action buttons
CI/CD fixes (from debugger + docker specialist review):
- Add explicit GITEA_TOKEN for checkout auth
- Add act_runner_config.yaml with container.network: host so job
  containers can reach git.sentinelforest.xyz (root cause of 0s
  silent checkout failure)
- Mount config into act_runner container

UI: Enlarge save/close/edit/delete icons in all detail panels
(EventDetailPanel, TodoDetailPanel, ReminderDetailPanel,
TaskDetailPanel, EntityDetailPanel) from h-7/h-3.5 to h-8/h-4
for better visibility and click targets.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 08:28:15 +08:00

85 lines
2.4 KiB
YAML

name: Build and Deploy UMBRA
on:
push:
branches: [main]
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: https://github.com/actions/checkout@v4
with:
token: ${{ secrets.GITEA_TOKEN }}
- name: Login to Gitea Container Registry
uses: https://github.com/docker/login-action@v3
with:
registry: ${{ vars.REGISTRY_HOST }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push backend
uses: https://github.com/docker/build-push-action@v5
with:
context: ./backend
push: true
tags: |
${{ vars.REGISTRY_HOST }}/rohskiddo/umbra-backend:main-latest
${{ vars.REGISTRY_HOST }}/rohskiddo/umbra-backend:${{ github.sha }}
- name: Build and push frontend
uses: https://github.com/docker/build-push-action@v5
with:
context: ./frontend
push: true
tags: |
${{ vars.REGISTRY_HOST }}/rohskiddo/umbra-frontend:main-latest
${{ vars.REGISTRY_HOST }}/rohskiddo/umbra-frontend:${{ github.sha }}
- name: Pull new images
run: |
cd /opt/umbra
docker compose pull backend frontend
- name: Deploy
run: |
cd /opt/umbra
docker compose up -d
- name: Health check
run: |
echo "Waiting for services to start..."
sleep 10
curl -f http://localhost/health || exit 1
- name: Prune old images
if: success()
run: docker image prune -f
- name: Notify success
if: success()
run: |
curl -s \
-H "Title: UMBRA Deploy Success" \
-H "Tags: white_check_mark" \
--data-binary @- https://ntfy.ghost6.xyz/claude <<'NTFY_EOF'
Build ${{ github.sha }} deployed successfully to umbra.ghost6.xyz.
Triggered by push to main.
NTFY_EOF
- name: Notify failure
if: failure()
run: |
curl -s \
-H "Title: UMBRA Deploy FAILED" \
-H "Tags: fire" \
-H "Priority: high" \
--data-binary @- https://ntfy.ghost6.xyz/claude <<'NTFY_EOF'
Deploy failed for commit ${{ github.sha }}.
Check Gitea Actions logs at git.sentinelforest.xyz.
NTFY_EOF