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/deploy-github-pages.yml
# Build and publish to GitHub Pages (deploy.cc)
# Repo → Settings → Pages → Source: GitHub Actions
name: Deploy to GitHub Pages
on:
push:
branches: ['main']
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: '24'
cache: npm
- name: Install dependencies
run: npm ci
- name: Build
run: 'npm run build'
- uses: actions/configure-pages@v6
- uses: actions/upload-pages-artifact@v5
with:
path: 'dist'
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v5
- 仓库 Settings → Pages → Build and deployment → Source 选 GitHub Actions。
- 项目页地址是 https://<用户名>.github.io/<仓库名>/,框架里要设置对应的 base 路径。
- npm ci 和 setup-node 的 npm 缓存都需要仓库里有 package-lock.json。
输入只接受字母、数字和常见路径字符,不合法的值会回退到默认值。