sudo-proxy/.github/workflows/cloudflare.yml

37 lines
844 B
YAML
Raw Normal View History

2023-09-14 17:27:34 +00:00
name: Deploy Worker
# this action is for the "deploy to cloudflare" button
# repository_dispatch is triggered by CF
# secrets should also be made by CF
on: ["repository_dispatch"]
jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
2024-01-07 17:29:42 +00:00
- uses: actions/checkout@v4
2023-09-14 18:19:07 +00:00
- uses: pnpm/action-setup@v2
2023-09-15 17:10:59 +00:00
with:
version: latest
2023-09-14 17:27:34 +00:00
- name: Install Node.js
uses: actions/setup-node@v3
with:
2024-01-07 17:29:42 +00:00
node-version: 20
2023-09-14 18:19:07 +00:00
cache: 'pnpm'
2023-09-14 17:27:34 +00:00
2023-09-14 18:19:07 +00:00
- name: Install packages
run: pnpm install --frozen-lockfile
2023-09-14 17:27:34 +00:00
- name: Build Project
2023-09-14 18:19:07 +00:00
run: pnpm build:cloudflare
2023-09-14 17:27:34 +00:00
- name: Build & Deploy Worker
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}