chore: deploy to Cloudflare Pages and update branding

- Add Cloudflare Pages deployment for landing page (snapotter.com) and
  docs (docs.snapotter.com)
- Create deploy-landing.yml and update deploy-docs.yml workflows
- Update CI to ignore apps/landing/** paths
- Fix logo transparency (remove white background) across all apps
- Recreate social-preview.png with SnapOtter branding
- Update all docs URLs from GitHub Pages to docs.snapotter.com
- Update VitePress config: light theme default, fix llms.txt paths
- Add .vitepress/cache/ and .env.* to gitignore
This commit is contained in:
SnapOtter
2026-04-24 18:06:29 +08:00
parent fbaa603d03
commit 0309e0f680
174 changed files with 970 additions and 926 deletions
+3 -1
View File
@@ -8,6 +8,7 @@ on:
- "CONTRIBUTING.md"
- "images/**"
- "apps/docs/**"
- "apps/landing/**"
- "docs/**"
pull_request:
branches: [main]
@@ -16,6 +17,7 @@ on:
- "CONTRIBUTING.md"
- "images/**"
- "apps/docs/**"
- "apps/landing/**"
- "docs/**"
concurrency:
@@ -111,7 +113,7 @@ jobs:
context: .
file: docker/Dockerfile
push: false
tags: ashim:ci
tags: snapotter:ci
build-args: SKIP_MODEL_DOWNLOADS=true
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}:cache-linux-amd64
cache-to: type=registry,ref=ghcr.io/${{ github.repository }}:cache-ci,mode=max
+21 -37
View File
@@ -1,4 +1,4 @@
name: Deploy Docs to GitHub Pages
name: Deploy Docs to Cloudflare Pages
on:
push:
@@ -7,48 +7,32 @@ on:
- "apps/docs/**"
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
concurrency:
group: pages
cancel-in-progress: false
group: deploy-docs
cancel-in-progress: true
jobs:
build:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node
uses: actions/setup-node@v4
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build Docs
run: pnpm --filter @ashim/docs docs:build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: apps/docs/.vitepress/dist
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
- run: pnpm install --frozen-lockfile
- name: Build Docs
run: pnpm --filter @snapotter/docs docs:build
- name: Deploy to Cloudflare Pages
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy apps/docs/.vitepress/dist --project-name snapotter-docs --branch main --commit-dirty=true
+38
View File
@@ -0,0 +1,38 @@
name: Deploy Landing to Cloudflare Pages
on:
push:
branches: [main]
paths:
- "apps/landing/**"
workflow_dispatch:
concurrency:
group: deploy-landing
cancel-in-progress: true
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: Build Landing Page
run: pnpm --filter @snapotter/landing build
- name: Deploy to Cloudflare Pages
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy apps/landing/out --project-name snapotter-landing --branch main --commit-dirty=true
+5 -5
View File
@@ -109,7 +109,7 @@ jobs:
uses: docker/metadata-action@v5
with:
images: |
ashimhq/ashim
snapotterhq/snapotter
ghcr.io/${{ github.repository }}
- name: Build and push by digest
@@ -120,7 +120,7 @@ jobs:
file: docker/Dockerfile
platforms: ${{ matrix.platform }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,"name=ashimhq/ashim,ghcr.io/${{ github.repository }}",push-by-digest=true,name-canonical=true,push=true
outputs: type=image,"name=snapotterhq/snapotter,ghcr.io/${{ github.repository }}",push-by-digest=true,name-canonical=true,push=true
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}:cache-${{ env.PLATFORM_PAIR }}
cache-to: type=registry,ref=ghcr.io/${{ github.repository }}:cache-${{ env.PLATFORM_PAIR }},mode=max
@@ -168,7 +168,7 @@ jobs:
uses: docker/metadata-action@v5
with:
images: |
ashimhq/ashim
snapotterhq/snapotter
ghcr.io/${{ github.repository }}
tags: |
type=semver,pattern={{version}},value=v${{ needs.release.outputs.new_version }}
@@ -180,8 +180,8 @@ jobs:
working-directory: /tmp/digests
run: |
docker buildx imagetools create \
$(jq -cr '.tags | map(select(startswith("ashimhq/")) | "-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf 'ashimhq/ashim@sha256:%s ' *)
$(jq -cr '.tags | map(select(startswith("snapotterhq/")) | "-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf 'snapotterhq/snapotter@sha256:%s ' *)
- name: Create GHCR manifest
working-directory: /tmp/digests