Skip to content

Commit

Permalink
Merge pull request #4 from RooRay/dev
Browse files Browse the repository at this point in the history
Automate Deployment to Cloudflare
  • Loading branch information
RooRay authored May 25, 2024
2 parents d869b64 + 9e0765a commit 69254f2
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/deploy.yml
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 }}
10 changes: 10 additions & 0 deletions wrangler.toml
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}
]

0 comments on commit 69254f2

Please sign in to comment.