forked from cloudflare/templates
-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (28 loc) · 893 Bytes
/
main.yaml
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
name: Main
on:
push:
branches: ["main"]
jobs:
check-and-deploy:
name: Check and Deploy
runs-on: ubuntu-latest
timeout-minutes: 5
concurrency: templates-check-and-deploy
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
TEMPLATES_API_CLIENT_ID: ${{ secrets.TEMPLATES_API_CLIENT_ID }}
TEMPLATES_API_CLIENT_SECRET: ${{ secrets.TEMPLATES_API_CLIENT_SECRET }}
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"
- run: npm ci
- run: npm run check:ci
- run: npm run deploy
# Upload to both staging and production, so our staging catalog stays up
# to date with production.
- run: npm run upload -- --staging
- run: npm run upload