-
-
Notifications
You must be signed in to change notification settings - Fork 8
22 lines (18 loc) · 750 Bytes
/
deploy.yaml
File metadata and controls
22 lines (18 loc) · 750 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
name: Deploy Workers
on:
workflow_call:
jobs:
deploy:
name: Deploy Workers
if: ${{ github.ref == 'refs/heads/main' }}
environment: production
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install dependencies for all sub-workers
run: find . -mindepth 1 -maxdepth 1 -type d -not -path '*/.*' -exec sh -c 'cd {} && npm install' \;
- name: Deploy workers to Cloudflare Edge
run: xargs -n1 -r0a <(find . -mindepth 1 -maxdepth 1 -type d -not -path '*/.*' -print0) sh -c 'for file do cd $file && npm run deploy && cd ..; done;' sh
env:
CLOUDFLARE_ACCOUNT_ID: 502aea548379e08369697540cc0bb0d1
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}