-
Notifications
You must be signed in to change notification settings - Fork 65
34 lines (32 loc) · 1.03 KB
/
deploy.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
name: Deploy
on:
workflow_dispatch:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy
steps:
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- name: Setup R2-Explorer
env:
R2EXPLORER_WORKER_NAME: ${{ vars.R2EXPLORER_WORKER_NAME }}
R2EXPLORER_CONFIG: ${{ vars.R2EXPLORER_CONFIG }}
R2EXPLORER_BUCKETS: ${{ vars.R2EXPLORER_BUCKETS }}
R2EXPLORER_DOMAIN: ${{ vars.R2EXPLORER_DOMAIN }}
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
run: node packages/github-action/prepareDeploy.js
- name: Get latest version
run: cd packages/github-action && npm install && npm install --save r2-explorer@latest
- name: Deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
workingDirectory: "packages/github-action"