Skip to content

Commit ad111e6

Browse files
Simplify Gumroad links tool and remove fetch worker (#20)
- simplify the Gumroad link builder UI to synchronise between username, product id, and product URL without fetching - remove the gumroad-products Cloudflare Worker and adjust deployment workflow and documentation accordingly ------ [Codex Task](https://chatgpt.com/codex/tasks/task_e_6917189a97f08325b3d679d4ccf05d3b)
1 parent 78d72f5 commit ad111e6

File tree

5 files changed

+9
-325
lines changed

5 files changed

+9
-325
lines changed

.github/workflows/deploy-cloudflare-workers.yml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ jobs:
1515
permissions:
1616
pull-requests: read
1717
outputs:
18-
gumroad_products: ${{ steps.filter.outputs.gumroad-products }}
1918
social_link_preview: ${{ steps.filter.outputs.social-link-preview }}
2019
# If I add more filters below, I need to “export them” here.
2120
steps:
@@ -26,37 +25,10 @@ jobs:
2625
id: filter
2726
with:
2827
filters: |
29-
gumroad-products:
30-
- 'cloudflare-workers/gumroad-products/**'
3128
social-link-preview:
3229
- 'cloudflare-workers/social-link-preview/**'
3330
# I can add more filters here and access them separately.
3431

35-
deploy-gumroad-products:
36-
name: Deploy Gumroad Products Worker
37-
runs-on: ubuntu-latest
38-
needs: changes
39-
if: ${{ github.event_name == 'workflow_dispatch' || needs.changes.outputs.gumroad_products == 'true' }}
40-
steps:
41-
- name: Checkout code
42-
uses: actions/checkout@v4
43-
44-
- name: Setup Node.js
45-
uses: actions/setup-node@v4
46-
with:
47-
node-version: '20'
48-
49-
- name: Install Wrangler
50-
run: npm install -g wrangler
51-
52-
- name: Deploy to Cloudflare Workers
53-
working-directory: cloudflare-workers/gumroad-products
54-
env:
55-
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
56-
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
57-
run: |
58-
wrangler deploy --env production
59-
6032
deploy-social-link-preview:
6133
name: Deploy Social Link Preview Worker
6234
runs-on: ubuntu-latest

cloudflare-workers/README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ Each worker lives in its own subdirectory with:
1010

1111
## Current Workers
1212

13-
### gumroad-products
14-
- **Location**: `cloudflare-workers/gumroad-products/`
15-
- **Purpose**: Fetch products from a Gumroad user profile page
16-
1713
### social-link-preview
1814
- **Location**: `cloudflare-workers/social-link-preview/`
1915
- **Purpose**: Fetch a URL server-side, extract metadata, and return link preview reports for the frontend tool
@@ -66,7 +62,7 @@ Each worker is deployed independently - only workers with changed files are depl
6662
To deploy manually from your local machine:
6763

6864
```bash
69-
cd cloudflare-workers/github-auth
65+
cd cloudflare-workers/social-link-preview
7066
wrangler deploy --env production
7167
```
7268

@@ -81,7 +77,7 @@ To add a new worker to this monorepo:
8177

8278
1. Create a new directory: `cloudflare-workers/your-worker-name/`
8379
2. Add your worker code as `worker.js`
84-
3. Create a `wrangler.toml` configuration (copy from github-auth as template)
80+
3. Create a `wrangler.toml` configuration (copy from social-link-preview as template)
8581
4. Add a new job to `.github/workflows/deploy-cloudflare-workers.yml` (see commented example)
8682
5. Push to main branch
8783

cloudflare-workers/gumroad-products/worker.js

Lines changed: 0 additions & 88 deletions
This file was deleted.

cloudflare-workers/gumroad-products/wrangler.toml

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)