chore(ci): move away from Netlify to Cloudflare Workers (Pages)

We are hitting Netlify project shutdown today, all because we pushed over 200 commits and triggering builds for the past 10 days as new billing cycle.[^1]

Giving that the fact Netlify setting the old Pro plan as legacy plans[^2], despite we spent more than $40 each month hosting over 30 pages for our open source
projects across @nolebase, @qifi-dev, @nekomeowww, @LittleSound, @proj-airi, and also @moeru, we used to have old Pro plan serve for over 2500 minutes of build[^3],
where currently Netlify Pro plan only offers 3000 credits[^4] (5000 credits when they first introduced[^5], but later reduced for unknown reason), and each production
build costs 15 credits no matter how long it takes or sizes, even counted for Netlify CLI uploads[^6].

We decided to move all our existing projects to Cloudflare Workers (Pages) as better alternative solution (even though Cloudflare suffers from incidents this month they do still
provide reasonable services for static website hosting without ridiculous pricing design Netlify offers).

[^1]: https://www.netlify.com/changelog/netlify-pricing-update-introducing-credit-based-plans/
[^2]: https://docs.netlify.com/manage/accounts-and-billing/billing/billing-for-legacy-plans/billing-faq-for-legacy-plans/
[^3]: https://web.archive.org/web/20250829201530/https://www.netlify.com/pricing/#pricing-table
[^4]: https://www.netlify.com/pricing/
[^5]: https://www.reddit.com/r/Netlify/comments/1n8hljx/comment/nhmfqh5/
[^6]: https://docs.netlify.com/manage/accounts-and-billing/billing/billing-for-credit-based-plans/how-credits-work/
This commit is contained in:
Neko Ayaka
2025-11-25 23:33:15 +08:00
parent 0277ee5dbf
commit e9e138e313
4 changed files with 80 additions and 3 deletions
@@ -0,0 +1,52 @@
name: Cloudflare Pages
on:
push:
branches:
- 'main'
jobs:
deploy:
name: Deploy - ${{ matrix.app }}
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
strategy:
matrix:
include:
- app: stage-web
environment_name: Production
environment_url: https://airi.moeru.ai/docs/
cloudflare_pages_id: proj-airi
dist_directory: ./apps/stage-web/dist
command: |
pnpm -F @proj-airi/stage-web run build
pnpm -F @proj-airi/docs run build:base
mv ./docs/.vitepress/dist ./apps/stage-web/dist/docs
cp ./apps/stage-web/dist/docs/sitemap.xml ./apps/stage-web/dist/sitemap.xml
pnpm -F @proj-airi/stage-ui run story:build
mv ./packages/stage-ui/.histoire/dist ./apps/stage-web/dist/ui
environment:
name: ${{ matrix.environment_name }}
url: ${{ matrix.environment_url }}
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
cache: pnpm
node-version: latest
registry-url: https://registry.npmjs.org
- run: ${{ matrix.command }}
- uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy ${{ matrix.dist_directory }} --project-name=${{ matrix.cloudflare_pages_id }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}