deploy.cc / 配置生成
部署配置生成器
选择类型、填写参数,生成可直接使用的配置。生成结果在发布前经过 actionlint、hadolint、systemd-analyze 和 docker build 测试;Action 版本核对于 2026-11-13。
Actions → Cloudflare PagesActions → GitHub PagesActions → SSH 部署到 VPSActions → 构建并推送 Docker 镜像Dockerfiledocker-compose.ymlsystemd 服务PM2 配置
.github/workflows/docker-image.yml
# Build and push a Docker image to GitHub Container Registry (deploy.cc)
# Uses the built-in GITHUB_TOKEN; no extra secrets needed.
name: Docker image
on:
push:
branches: ['main']
tags: ['v*']
workflow_dispatch:
permissions:
contents: read
packages: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: docker/setup-qemu-action@v4
- uses: docker/setup-buildx-action@v4
- uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: meta
uses: docker/metadata-action@v6
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=sha
- uses: docker/build-push-action@v7
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
- 推送 v1.2.3 这样的 tag 会额外生成版本号标签。
- 多架构(arm64)构建用 QEMU 模拟,速度较慢。
- GHCR 镜像默认是私有的,需要时到 Packages 设置里改为公开。
输入只接受字母、数字和常见路径字符,不合法的值会回退到默认值。