Compare commits

..

2 commits

Author SHA1 Message Date
db0d4eeed2 fix: FAQ accordion double-toggle bug, de-emphasize rate limiting
Some checks failed
Build & Deploy to Staging / Build & Deploy to Staging (push) Failing after 11m1s
- FAQ had both inline onclick AND addEventListener, causing double-toggle (no visible change)
- Removed duplicate JS listener, keeping inline onclick
- Replaced 'Rate limiting' mention in features with 'Secure defaults'
2026-02-20 09:34:13 +00:00
2ad648aeaa fix: update CI/CD workflows to match DocFast pattern
- deploy.yml: proper Docker buildx setup, arm64 build, kubectl deploy to staging
- promote.yml: production deploy on v* tags with proper image tagging
2026-02-20 08:10:11 +00:00
3 changed files with 55 additions and 55 deletions

View file

@ -1,40 +1,44 @@
name: Deploy to Staging
name: Build & Deploy to Staging
on:
push:
branches: [main]
branches: [ main ]
jobs:
build-and-deploy:
build-and-stage:
name: Build & Deploy to Staging
runs-on: ubuntu-latest
steps:
- name: Checkout code
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Container Registry
- name: Login to Forgejo Registry
uses: docker/login-action@v3
with:
registry: git.cloonar.com
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
username: openclawd
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and Push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/arm64
push: true
no-cache: true
tags: |
git.cloonar.com/openclawd/snapapi:staging
git.cloonar.com/openclawd/snapapi:latest
git.cloonar.com/openclawd/snapapi:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Deploy to staging
platforms: linux/arm64
- name: Deploy to Staging
run: |
echo "Triggering staging deployment..."
# The actual deployment is handled by ArgoCD or similar GitOps tool
# This would typically update a helm chart or kubernetes manifest repo
curl -sLO "https://dl.k8s.io/release/$(curl -sL https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x kubectl
echo "${{ secrets.KUBECONFIG }}" | base64 -d > /tmp/kubeconfig.yaml
./kubectl set image deployment/snapapi \
snapapi=git.cloonar.com/openclawd/snapapi:${{ github.sha }} \
-n snapapi-staging --kubeconfig=/tmp/kubeconfig.yaml
./kubectl rollout status deployment/snapapi \
-n snapapi-staging --kubeconfig=/tmp/kubeconfig.yaml --timeout=180s
echo "✅ Staging deploy complete!"

View file

@ -6,40 +6,39 @@ on:
jobs:
promote:
name: Promote to Production
runs-on: ubuntu-latest
steps:
- name: Checkout code
- name: Checkout
uses: actions/checkout@v4
- name: Login to Container Registry
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Forgejo Registry
uses: docker/login-action@v3
with:
registry: git.cloonar.com
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get latest staging image
id: get_image
username: openclawd
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and Push Production
uses: docker/build-push-action@v5
with:
context: .
push: true
no-cache: true
tags: |
git.cloonar.com/openclawd/snapapi:prod
git.cloonar.com/openclawd/snapapi:${{ github.ref_name }}
platforms: linux/arm64
- name: Deploy to Production
run: |
# Get the latest staging image digest
STAGING_DIGEST=$(docker manifest inspect git.cloonar.com/openclawd/snapapi:staging --verbose | jq -r '.Descriptor.digest')
echo "staging_digest=$STAGING_DIGEST" >> $GITHUB_OUTPUT
# Extract version from tag
VERSION=${GITHUB_REF#refs/tags/}
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Re-tag for production
run: |
# Pull staging image and re-tag for production
docker buildx imagetools create \
--tag git.cloonar.com/openclawd/snapapi:latest \
--tag git.cloonar.com/openclawd/snapapi:${{ steps.get_image.outputs.version }} \
--tag git.cloonar.com/openclawd/snapapi:prod \
git.cloonar.com/openclawd/snapapi:staging
- name: Deploy to production
run: |
echo "Triggering production deployment for version ${{ steps.get_image.outputs.version }}..."
# The actual deployment is handled by ArgoCD or similar GitOps tool
# This would typically update a helm chart or kubernetes manifest repo
curl -sLO "https://dl.k8s.io/release/$(curl -sL https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x kubectl
echo "${{ secrets.KUBECONFIG }}" | base64 -d > /tmp/kubeconfig.yaml
./kubectl set image deployment/snapapi \
snapapi=git.cloonar.com/openclawd/snapapi:${{ github.ref_name }} \
-n snapapi --kubeconfig=/tmp/kubeconfig.yaml
./kubectl rollout status deployment/snapapi \
-n snapapi --kubeconfig=/tmp/kubeconfig.yaml --timeout=180s
echo "✅ Production deploy complete!"

View file

@ -330,7 +330,7 @@ footer{border-top:1px solid var(--border);padding:48px 24px 32px;background:var(
<div class="feature-card">
<div class="feature-icon purple">🔒</div>
<h3>Secure by Default</h3>
<p>SSRF protection blocks internal IPs and metadata endpoints. Rate limiting and strict input validation built in.</p>
<p>SSRF protection blocks internal IPs and metadata endpoints. Strict input validation and secure defaults built in.</p>
</div>
<div class="feature-card">
<div class="feature-icon orange">📐</div>
@ -633,10 +633,7 @@ async function runPlayground(){
}
}
// FAQ toggles
document.querySelectorAll('.faq-q').forEach(function(q){
q.addEventListener('click',function(){this.parentElement.classList.toggle('open')});
});
// FAQ toggles — handled by inline onclick, no duplicate listeners needed
// Smooth scroll
document.querySelectorAll('a[href^="#"]').forEach(function(a){