Convert Cloudflare Worker to Cloudflare Pages
This commit converts the entire Xget application from a Cloudflare Worker to a Cloudflare Page, enabling static asset hosting while maintaining all existing functionality. Changes: - Add functions/[[path]].js: Catch-all Pages Function handler - Add public/index.html: Landing page with Xget information - Update src/index.js: Export handleRequest for Pages Function import - Update wrangler.toml: Configure for Pages deployment - Update package.json: Change scripts to use Pages commands - Update vitest.config.js: Include functions/ in coverage - Update .github/workflows/depoly.yml: Deploy to Pages - Update documentation: CLAUDE.md, README.md, README.en.md The conversion maintains full backward compatibility with existing tests and functionality. All caching strategies, security headers, and protocol handling remain unchanged.
This commit is contained in:
10 files changed
+240
-35
No files matched your search
@@ -1,4 +1,4 @@
|
||||
name: Deploy Worker
|
||||
name: Deploy to Cloudflare Pages
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
@@ -25,8 +25,9 @@ jobs:
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Deploy Worker
|
||||
- name: Deploy to Cloudflare Pages
|
||||
uses: cloudflare/wrangler-action@v3
|
||||
with:
|
||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||
command: pages deploy
|
||||
Reference in new issue
Block a user