Skip to content

Commit

Permalink
chore(workers-shared): Configure GitHub Actions to deploy Asset Worker
Browse files Browse the repository at this point in the history
  • Loading branch information
CarmenPopoviciu committed Sep 11, 2024
1 parent 4107f57 commit b165b61
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/changesets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jobs:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
WORKERS_NEW_CLOUDFLARE_ACCOUNT_ID: ${{ secrets.WORKERS_NEW_CLOUDFLARE_ACCOUNT_ID }}
WORKERS_NEW_CLOUDFLARE_API_TOKEN: ${{ secrets.WORKERS_NEW_CLOUDFLARE_API_TOKEN }}
WORKERS_DEPLOY_AND_CONFIG_CLOUDFLARE_API_TOKEN: ${{ secrets.WORKERS_DEPLOY_AND_CONFIG_CLOUDFLARE_API_TOKEN }}

- name: Create C3 Diffs PR
if: contains(steps.changesets.outputs.publishedPackages, '"create-cloudflare"')
Expand Down
2 changes: 1 addition & 1 deletion packages/workers-shared/asset-worker/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# `asset-worker`

The Asset Worker is a [Cloudflare Worker](https://developers.cloudflare.com/workers/) that is responsible of serving assets for Workers deployed on the edge, that contain static assets as well.
The Asset Worker is a [Cloudflare Worker](https://developers.cloudflare.com/workers/) that is responsible of serving static assets. It is deployed in production and is also used in local `wrangler dev`.
2 changes: 2 additions & 0 deletions packages/workers-shared/asset-worker/wrangler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@
# (see packages/wrangler/src/dev/miniflare.ts -> buildMiniflareOptions())
##
name = "asset-worker"
account_id = "0f1b8aa119a907021f659042f95ea9ba"
workers_dev = false
main = "src/index.ts"
compatibility_date = "2024-07-31"
2 changes: 2 additions & 0 deletions packages/workers-shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
"check:type": "pnpm run check:type:tests && tsc",
"check:type:tests": "tsc -p ./asset-worker/tests/tsconfig.json",
"clean": "rimraf dist",
"deploy": "pnpm run deploy:asset-worker",
"deploy:asset-worker": "CLOUDFLARE_API_TOKEN=$WORKERS_NEW_CLOUDFLARE_API_TOKEN wrangler versions upload --experimental-versions -c asset-server-worker/wrangler.toml",
"dev": "pnpm run clean && concurrently -n bundle:asset-worker,bundle:router-worker -c blue,magenta \"pnpm run bundle:asset-worker --watch\" \"pnpm run bundle:router-worker --watch\"",
"test": "vitest",
"test:ci": "pnpm run test run"
Expand Down

0 comments on commit b165b61

Please sign in to comment.