-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from RooRay/dev
Automate Deployment to Cloudflare
- Loading branch information
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Test and Deploy to Cloudflare Workers | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
name: Deploy to Cloudflare Workers | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Deploy to Cloudflare Workers | ||
uses: cloudflare/wrangler-action@v3 | ||
with: | ||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Top-level configuration | ||
name = "mediacdn" | ||
main = "worker.js" | ||
compatibility_date = "2023-05-25" | ||
|
||
workers_dev = false | ||
routes = [ | ||
{ pattern = "cdn.rooray.xyz", custom_domain = true }, | ||
{ pattern = "img.rooray.xyz", custom_domain = true} | ||
] |