Skip to content

Azion

Azion is an edge computing platform that deploys from GitHub. pageflare integrates through a GitHub Actions workflow — optimize your site after building and before deploying to Azion’s edge network.

Add the pageflare GitHub Action between your build step and Azion’s deploy step in your workflow.

.github/workflows/deploy.yml
name: Deploy to Azion
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 }}
- name: Deploy to Azion
uses: aziontech/azion-cli-action@latest
with:
args: deploy
env:
AZION_TOKEN: ${{ secrets.AZION_TOKEN }}

Add PAGEFLARE_LICENSE as a GitHub repository secret:

  1. Go to Settings > Secrets and variables > Actions.
  2. Add a secret named PAGEFLARE_LICENSE with your license key.

After pushing, check the Actions tab. Look for the pageflare summary in the “Optimize with pageflare” step:

Done 145.2 KB saved (38.1%) 1.2s
Files 42 total, 38 optimized, 4 unchanged, 0 errors
FrameworkOutput directory
Astrodist/
Next.js static exportout/
Vitedist/
Hugopublic/

Deploy uses unoptimized files Make sure the pageflare step runs before the Azion deploy step in your workflow.