Skip to content

Commit

Permalink
以防老铁没有域名, 分别部署多个Worker进行代理
Browse files Browse the repository at this point in the history
  • Loading branch information
juhaoming committed Jul 8, 2024
1 parent afc41ef commit 617b506
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
30 changes: 29 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,37 @@ jobs:

- run: npm install

- name: Build & Deploy Worker
- name: Build & Deploy Worker HubHub
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
command: deploy src/worker.js

- name: Build & Deploy Worker Dockerhub
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
command: deploy src/worker.js --project-name=dockerhub

- name: Build & Deploy Worker K8S
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
command: deploy src/worker.js --project-name=k8s

- name: Build & Deploy Worker Quay
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
command: deploy src/worker.js --project-name=quay

- name: Build & Deploy Worker Gcr
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
command: deploy src/worker.js --project-name=gcr
1 change: 0 additions & 1 deletion src/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export default {
"g": "gcr.io",
"ggg": "gcr.io",
"gcr": "gcr.io",
"test": "test.io"
};

const url = new URL(request.url);
Expand Down

0 comments on commit 617b506

Please sign in to comment.