EdgeOne Pages
EdgeOne Pages (Tencent Cloud) deploys static sites from GitHub repositories. pageflare integrates through a GitHub Actions workflow — optimize your build output before EdgeOne deploys it.
How It Works
Section titled “How It Works”Add the pageflare GitHub Action between your build step and EdgeOne’s deploy step in your workflow.
Step 1 — Create the Workflow
Section titled “Step 1 — Create the Workflow”name: Deploy to EdgeOne Pages
on: push: branches: [main]
jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4
- name: Setup Node uses: actions/setup-node@v4 with: node-version: 22
- name: Build site run: npm ci && npm run build
- name: Optimize with pageflare uses: getappz/pageflare-cli@v1 with: args: "dist/ --in-place" env: PAGEFLARE_LICENSE: ${{ secrets.PAGEFLARE_LICENSE }}
# Deploy to EdgeOne Pages using their CLI or actionAlternatively, if EdgeOne builds from your repository directly, add pageflare to your package.json build script:
{ "scripts": { "build": "astro build && npx @pageflare/cli dist/ --in-place --no-progress" }}Step 2 — Pro License
Section titled “Step 2 — Pro License”Add PAGEFLARE_LICENSE as a GitHub repository secret, or set it in the EdgeOne Pages dashboard under environment variables.
Step 3 — Verify
Section titled “Step 3 — Verify”Check the build logs for the pageflare summary:
Done 145.2 KB saved (38.1%) 1.2s Files 42 total, 38 optimized, 4 unchanged, 0 errorsFramework Output Directories
Section titled “Framework Output Directories”| Framework | Output directory |
|---|---|
| Astro | dist/ |
| Next.js static export | out/ |
| Vite | dist/ |
| Hugo | public/ |
Troubleshooting
Section titled “Troubleshooting”Deploy uses unoptimized files
Make sure pageflare runs after the build and before the deploy. Use the --in-place flag to overwrite files in the output directory.