-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 783 Bytes
/
cd.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: CD
on:
push:
branches:
- main
env:
PNPM_CACHE_FOLDER: .pnpm-store
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
strategy:
matrix:
workerDirectory:
- workers/a
- workers/b
steps:
# env stuff
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: node - setup
uses: actions/setup-node@v3
with:
node-version: 14.x
- name: diff changes
run: echo "CHANGES_DETECTED=$(git diff HEAD~1 --name-only ${{matrix.workerDirectory}})" >> $GITHUB_ENV
- name: deploy
uses: cloudflare/[email protected]
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
if: env.CHANGES_DETECTED