AWS via Flightcontrol
Flightcontrol deploys to AWS from GitHub repositories. pageflare integrates through a GitHub Actions workflow — optimize your site before Flightcontrol picks up the build output.
How It Works
Section titled “How It Works”Add the pageflare GitHub Action to your workflow. Flightcontrol watches your repository for changes, so pageflare needs to run as part of the build that Flightcontrol deploys.
Option A: GitHub Actions Workflow
Section titled “Option A: GitHub Actions Workflow”If you use GitHub Actions for your build:
name: Build and Optimize
on: push: branches: [main]
jobs: build: 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 }}Option B: Build Command Override
Section titled “Option B: Build Command Override”If Flightcontrol runs the build, add pageflare to your package.json:
{ "scripts": { "build": "astro build && npx @pageflare/cli dist/ --in-place --no-progress" }}Pro License
Section titled “Pro License”Add PAGEFLARE_LICENSE as a GitHub repository secret or set it in the Flightcontrol dashboard under environment variables.
Verify
Section titled “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/ |
| Hugo | public/ |
| Vite | dist/ |
Troubleshooting
Section titled “Troubleshooting”Flightcontrol deploys unoptimized files Make sure pageflare runs as part of the build that Flightcontrol deploys from. If using GitHub Actions, ensure the optimized files are committed or the workflow triggers Flightcontrol.