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.
How It Works
Section titled “How It Works”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.
Step 1 — Install pageflare
Section titled “Step 1 — Install pageflare”npm install -D @pageflare/cliStep 2 — Configure the Build
Section titled “Step 2 — Configure the Build”Add a deploy script to your 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:
npm run buildnpx @pageflare/cli dist/ --in-place --no-progressjuno deployCI/CD with GitHub Actions
Section titled “CI/CD with GitHub Actions”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 }}Step 3 — Pro License
Section titled “Step 3 — Pro License”Set PAGEFLARE_LICENSE as an environment variable:
export PAGEFLARE_LICENSE=your-license-keyOr add it as a CI secret for automated deployments.
Step 4 — Verify
Section titled “Step 4 — Verify”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 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”Juno deploys unoptimized files
Make sure pageflare runs before juno deploy. The --in-place flag overwrites files so Juno uploads the optimized versions.