Disable CI — moved to coop/art-dag monorepo
This commit is contained in:
@@ -1,62 +0,0 @@
|
|||||||
name: Build and Deploy
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
|
|
||||||
env:
|
|
||||||
REGISTRY: registry.rose-ash.com:5000
|
|
||||||
IMAGE: l2-server
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-and-deploy:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install tools
|
|
||||||
run: |
|
|
||||||
apt-get update && apt-get install -y --no-install-recommends openssh-client
|
|
||||||
|
|
||||||
- name: Set up SSH
|
|
||||||
env:
|
|
||||||
SSH_KEY: ${{ secrets.DEPLOY_SSH_KEY }}
|
|
||||||
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
|
|
||||||
run: |
|
|
||||||
mkdir -p ~/.ssh
|
|
||||||
echo "$SSH_KEY" > ~/.ssh/id_rsa
|
|
||||||
chmod 600 ~/.ssh/id_rsa
|
|
||||||
ssh-keyscan -H "$DEPLOY_HOST" >> ~/.ssh/known_hosts 2>/dev/null || true
|
|
||||||
|
|
||||||
- name: Pull latest code on server
|
|
||||||
env:
|
|
||||||
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
|
|
||||||
run: |
|
|
||||||
ssh "root@$DEPLOY_HOST" "
|
|
||||||
cd /root/art-dag/activity-pub
|
|
||||||
git fetch origin main
|
|
||||||
git reset --hard origin/main
|
|
||||||
"
|
|
||||||
|
|
||||||
- name: Build and push image
|
|
||||||
env:
|
|
||||||
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
|
|
||||||
run: |
|
|
||||||
ssh "root@$DEPLOY_HOST" "
|
|
||||||
cd /root/art-dag/activity-pub
|
|
||||||
docker build --build-arg CACHEBUST=\$(date +%s) -t ${{ env.REGISTRY }}/${{ env.IMAGE }}:latest -t ${{ env.REGISTRY }}/${{ env.IMAGE }}:${{ github.sha }} .
|
|
||||||
docker push ${{ env.REGISTRY }}/${{ env.IMAGE }}:latest
|
|
||||||
docker push ${{ env.REGISTRY }}/${{ env.IMAGE }}:${{ github.sha }}
|
|
||||||
"
|
|
||||||
|
|
||||||
- name: Deploy stack
|
|
||||||
env:
|
|
||||||
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
|
|
||||||
run: |
|
|
||||||
ssh "root@$DEPLOY_HOST" "
|
|
||||||
cd /root/art-dag/activity-pub
|
|
||||||
docker stack deploy -c docker-compose.yml activitypub
|
|
||||||
echo 'Waiting for services to update...'
|
|
||||||
sleep 10
|
|
||||||
docker stack services activitypub
|
|
||||||
"
|
|
||||||
63
app/templates/activities/detail.html
Normal file
63
app/templates/activities/detail.html
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block title %}Activity {{ activity.activity_id[:16] }}{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="max-w-3xl mx-auto">
|
||||||
|
<div class="mb-6">
|
||||||
|
<a href="/activities" class="inline-flex items-center text-blue-400 hover:text-blue-300">
|
||||||
|
<svg class="w-4 h-4 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7"/>
|
||||||
|
</svg>
|
||||||
|
Back to Activities
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="bg-gray-800 rounded-lg p-6">
|
||||||
|
<div class="flex items-center justify-between mb-6">
|
||||||
|
<h1 class="text-2xl font-bold text-white">{{ activity.activity_type }}</h1>
|
||||||
|
<span class="px-3 py-1 bg-blue-600 text-white text-sm rounded-full">
|
||||||
|
Activity
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="space-y-4">
|
||||||
|
<div>
|
||||||
|
<p class="text-sm text-gray-400 mb-1">Activity ID</p>
|
||||||
|
<p class="font-mono text-sm text-gray-200 break-all">{{ activity.activity_id }}</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<p class="text-sm text-gray-400 mb-1">Actor</p>
|
||||||
|
<p class="text-gray-200">{{ activity.actor_id }}</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<p class="text-sm text-gray-400 mb-1">Published</p>
|
||||||
|
<p class="text-gray-200">{{ activity.published }}</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% if activity.anchor_root %}
|
||||||
|
<div>
|
||||||
|
<p class="text-sm text-gray-400 mb-1">Anchor Root</p>
|
||||||
|
<p class="font-mono text-sm text-gray-200 break-all">{{ activity.anchor_root }}</p>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if activity.object_data %}
|
||||||
|
<div>
|
||||||
|
<p class="text-sm text-gray-400 mb-2">Object Data</p>
|
||||||
|
<pre class="bg-gray-900 rounded p-4 text-xs text-gray-300 overflow-x-auto">{{ activity.object_data | tojson(indent=2) }}</pre>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if activity.signature %}
|
||||||
|
<div>
|
||||||
|
<p class="text-sm text-gray-400 mb-2">Signature</p>
|
||||||
|
<pre class="bg-gray-900 rounded p-4 text-xs text-gray-300 overflow-x-auto">{{ activity.signature | tojson(indent=2) }}</pre>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
81
app/templates/anchors/detail.html
Normal file
81
app/templates/anchors/detail.html
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block title %}Anchor {{ anchor.merkle_root[:16] }}{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="max-w-3xl mx-auto">
|
||||||
|
<div class="mb-6">
|
||||||
|
<a href="/anchors" class="inline-flex items-center text-blue-400 hover:text-blue-300">
|
||||||
|
<svg class="w-4 h-4 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7"/>
|
||||||
|
</svg>
|
||||||
|
Back to Anchors
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="bg-gray-800 rounded-lg p-6">
|
||||||
|
<div class="flex items-center justify-between mb-6">
|
||||||
|
<h1 class="text-2xl font-bold text-white">Bitcoin Anchor</h1>
|
||||||
|
<span class="px-3 py-1 text-sm rounded-full
|
||||||
|
{% if anchor.confirmed_at %}bg-green-600{% else %}bg-yellow-600{% endif %}">
|
||||||
|
{% if anchor.confirmed_at %}Confirmed{% else %}Pending{% endif %}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="space-y-4">
|
||||||
|
<div>
|
||||||
|
<p class="text-sm text-gray-400 mb-1">Merkle Root</p>
|
||||||
|
<p class="font-mono text-sm text-gray-200 break-all">{{ anchor.merkle_root }}</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="grid grid-cols-2 gap-4">
|
||||||
|
<div>
|
||||||
|
<p class="text-sm text-gray-400 mb-1">Activity Count</p>
|
||||||
|
<p class="text-xl font-semibold text-white">{{ anchor.activity_count }}</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<p class="text-sm text-gray-400 mb-1">Created</p>
|
||||||
|
<p class="text-gray-200">{{ anchor.created_at }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% if anchor.bitcoin_txid %}
|
||||||
|
<div>
|
||||||
|
<p class="text-sm text-gray-400 mb-1">Bitcoin Transaction</p>
|
||||||
|
<a href="https://mempool.space/tx/{{ anchor.bitcoin_txid }}" target="_blank" rel="noopener"
|
||||||
|
class="font-mono text-sm text-blue-400 hover:text-blue-300 break-all">
|
||||||
|
{{ anchor.bitcoin_txid }}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if anchor.confirmed_at %}
|
||||||
|
<div>
|
||||||
|
<p class="text-sm text-gray-400 mb-1">Confirmed At</p>
|
||||||
|
<p class="text-gray-200">{{ anchor.confirmed_at }}</p>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if anchor.tree_ipfs_cid %}
|
||||||
|
<div>
|
||||||
|
<p class="text-sm text-gray-400 mb-1">Merkle Tree IPFS CID</p>
|
||||||
|
<a href="https://ipfs.io/ipfs/{{ anchor.tree_ipfs_cid }}" target="_blank" rel="noopener"
|
||||||
|
class="font-mono text-sm text-blue-400 hover:text-blue-300 break-all">
|
||||||
|
{{ anchor.tree_ipfs_cid }}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if anchor.ots_proof_cid %}
|
||||||
|
<div>
|
||||||
|
<p class="text-sm text-gray-400 mb-1">OpenTimestamps Proof CID</p>
|
||||||
|
<a href="https://ipfs.io/ipfs/{{ anchor.ots_proof_cid }}" target="_blank" rel="noopener"
|
||||||
|
class="font-mono text-sm text-blue-400 hover:text-blue-300 break-all">
|
||||||
|
{{ anchor.ots_proof_cid }}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
81
app/templates/assets/detail.html
Normal file
81
app/templates/assets/detail.html
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block title %}{{ asset.name }} - Asset{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="max-w-4xl mx-auto">
|
||||||
|
<div class="mb-6">
|
||||||
|
<a href="/assets" class="inline-flex items-center text-blue-400 hover:text-blue-300">
|
||||||
|
<svg class="w-4 h-4 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7"/>
|
||||||
|
</svg>
|
||||||
|
Back to Assets
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="bg-gray-800 rounded-lg overflow-hidden">
|
||||||
|
<!-- Asset Preview -->
|
||||||
|
<div class="aspect-video bg-gray-900 flex items-center justify-center">
|
||||||
|
{% if asset.asset_type == 'video' %}
|
||||||
|
<svg class="w-24 h-24 text-gray-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"/>
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/>
|
||||||
|
</svg>
|
||||||
|
{% elif asset.asset_type == 'image' %}
|
||||||
|
<svg class="w-24 h-24 text-gray-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"/>
|
||||||
|
</svg>
|
||||||
|
{% else %}
|
||||||
|
<svg class="w-24 h-24 text-gray-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"/>
|
||||||
|
</svg>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Asset Info -->
|
||||||
|
<div class="p-6">
|
||||||
|
<div class="flex items-start justify-between mb-4">
|
||||||
|
<div>
|
||||||
|
<h1 class="text-2xl font-bold text-white mb-1">{{ asset.name }}</h1>
|
||||||
|
<p class="text-gray-400">by {{ asset.owner }}</p>
|
||||||
|
</div>
|
||||||
|
<span class="px-3 py-1 bg-purple-600 text-white text-sm rounded-full">
|
||||||
|
{{ asset.asset_type }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% if asset.description %}
|
||||||
|
<p class="text-gray-300 mb-6">{{ asset.description }}</p>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if asset.tags %}
|
||||||
|
<div class="flex flex-wrap gap-2 mb-6">
|
||||||
|
{% for tag in asset.tags %}
|
||||||
|
<span class="px-2 py-1 bg-gray-700 text-gray-300 text-sm rounded">{{ tag }}</span>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6">
|
||||||
|
<div class="bg-gray-900 rounded-lg p-4">
|
||||||
|
<p class="text-sm text-gray-400 mb-1">Content Hash</p>
|
||||||
|
<p class="font-mono text-xs text-gray-200 break-all">{{ asset.content_hash }}</p>
|
||||||
|
</div>
|
||||||
|
{% if asset.ipfs_cid %}
|
||||||
|
<div class="bg-gray-900 rounded-lg p-4">
|
||||||
|
<p class="text-sm text-gray-400 mb-1">IPFS CID</p>
|
||||||
|
<a href="https://ipfs.io/ipfs/{{ asset.ipfs_cid }}" target="_blank" rel="noopener"
|
||||||
|
class="font-mono text-xs text-blue-400 hover:text-blue-300 break-all">
|
||||||
|
{{ asset.ipfs_cid }}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="text-sm text-gray-500">
|
||||||
|
Created {{ asset.created_at }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
62
app/templates/users/profile.html
Normal file
62
app/templates/users/profile.html
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block title %}{{ profile.username }} - Profile{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="max-w-4xl mx-auto">
|
||||||
|
<!-- Profile Header -->
|
||||||
|
<div class="bg-gray-800 rounded-lg p-6 mb-6">
|
||||||
|
<div class="flex items-start gap-6">
|
||||||
|
<div class="w-24 h-24 bg-gradient-to-br from-blue-500 to-purple-600 rounded-full flex items-center justify-center text-3xl font-bold text-white">
|
||||||
|
{{ profile.username[0]|upper }}
|
||||||
|
</div>
|
||||||
|
<div class="flex-1">
|
||||||
|
<h1 class="text-2xl font-bold text-white mb-1">{{ profile.display_name or profile.username }}</h1>
|
||||||
|
<p class="text-gray-400 mb-3">@{{ profile.username }}</p>
|
||||||
|
{% if profile.bio %}
|
||||||
|
<p class="text-gray-300">{{ profile.bio }}</p>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Assets -->
|
||||||
|
<div class="bg-gray-800 rounded-lg p-6">
|
||||||
|
<h2 class="text-xl font-semibold text-white mb-4">Assets</h2>
|
||||||
|
|
||||||
|
{% if assets %}
|
||||||
|
<div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4">
|
||||||
|
{% for asset in assets %}
|
||||||
|
<a href="/assets/{{ asset.name }}" class="group">
|
||||||
|
<div class="aspect-square bg-gray-900 rounded-lg overflow-hidden">
|
||||||
|
{% if asset.asset_type == 'image' %}
|
||||||
|
<div class="w-full h-full bg-gradient-to-br from-green-900/50 to-blue-900/50 flex items-center justify-center">
|
||||||
|
<svg class="w-12 h-12 text-gray-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"/>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
{% elif asset.asset_type == 'video' %}
|
||||||
|
<div class="w-full h-full bg-gradient-to-br from-purple-900/50 to-pink-900/50 flex items-center justify-center">
|
||||||
|
<svg class="w-12 h-12 text-gray-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"/>
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<div class="w-full h-full bg-gray-700 flex items-center justify-center">
|
||||||
|
<svg class="w-12 h-12 text-gray-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"/>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
<p class="mt-2 text-sm text-gray-300 truncate group-hover:text-white">{{ asset.name }}</p>
|
||||||
|
</a>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<p class="text-gray-500 text-center py-8">No assets yet.</p>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
Reference in New Issue
Block a user