fix: redirects + update root cdn url
This commit is contained in:
parent
f533a16bdc
commit
693fcbd2b4
24 changed files with 0 additions and 1006 deletions
45
.github/workflows/deploy-worker.yaml
vendored
45
.github/workflows/deploy-worker.yaml
vendored
|
@ -1,45 +0,0 @@
|
|||
name: Deploy Cloudflare Worker
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
worker-folder:
|
||||
description: 'Select the folder containing the worker to deploy'
|
||||
required: true
|
||||
type: choice
|
||||
options:
|
||||
- analytics
|
||||
- contact
|
||||
- now-playing
|
||||
- rebuild
|
||||
- scrobble
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '16'
|
||||
|
||||
- name: Install Wrangler
|
||||
run: npm install -g wrangler
|
||||
|
||||
- name: Inject environment variables into wrangler.toml
|
||||
run: |
|
||||
cd workers/${{ github.event.inputs.worker-folder }}
|
||||
sed -i 's/^zone_id =.*/zone_id = "${{ secrets.CLOUDFLARE_ZONE_ID }}"/' wrangler.toml
|
||||
sed -i 's/^account_id =.*/account_id = "${{ secrets.CLOUDFLARE_ACCOUNT_ID }}"/' wrangler.toml
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cd workers/${{ github.event.inputs.worker-folder }}
|
||||
npm i
|
||||
|
||||
- name: Deploy to Cloudflare Worker
|
||||
run: |
|
||||
cd workers/${{ github.event.inputs.worker-folder }}
|
||||
wrangler deploy --env production
|
||||
env:
|
||||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
Reference in a new issue