Skip to content

Juno

Juno is a blockchain-based hosting platform for static sites. pageflare integrates by optimizing your build output locally before you deploy with the Juno CLI.

Build your site, run pageflare to optimize the output, then deploy with juno deploy. pageflare runs locally (or in CI) as a post-build step.

Terminal window
npm install -D @pageflare/cli

Add a deploy script to your package.json:

package.json
{
"scripts": {
"build": "astro build",
"optimize": "npx @pageflare/cli dist/ --in-place --no-progress",
"deploy": "npm run build && npm run optimize && juno deploy"
}
}

Or run manually:

Terminal window
npm run build
npx @pageflare/cli dist/ --in-place --no-progress
juno deploy
.github/workflows/deploy.yml
name: Deploy to Juno
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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 Juno
run: npx juno deploy
env:
JUNO_TOKEN: ${{ secrets.JUNO_TOKEN }}

Set PAGEFLARE_LICENSE as an environment variable:

Terminal window
export PAGEFLARE_LICENSE=your-license-key

Or add it as a CI secret for automated deployments.

Check the terminal output for the pageflare summary:

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/

Juno deploys unoptimized files Make sure pageflare runs before juno deploy. The --in-place flag overwrites files so Juno uploads the optimized versions.