forked from betaflight/betaflight-configurator
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (51 loc) · 1.78 KB
/
deploy_cloudflare.yml
File metadata and controls
54 lines (51 loc) · 1.78 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Deploy to Cloudflare
on:
workflow_call:
inputs:
branch_name:
description: 'Cloudflare Pages branch name to deploy to'
required: true
type: string
environment_name:
description: 'GitHub environment name for deployment tracking (optional)'
required: false
type: string
default: ''
secrets:
CLOUDFLARE_API_TOKEN:
required: true
CLOUDFLARE_ACCOUNT_ID:
required: true
outputs:
deployment_url:
description: 'The URL of the Cloudflare Pages deployment'
value: ${{ jobs.deploy.outputs.deployment_url }}
deployment_alias_url:
description: 'The alias URL of the Cloudflare Pages deployment'
value: ${{ jobs.deploy.outputs.deployment_alias_url }}
jobs:
deploy:
name: Deploy to Cloudflare Pages
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
deployments: write
environment:
name: ${{ inputs.environment_name != '' && inputs.environment_name || github.ref_name }}
outputs:
deployment_url: ${{ steps.deploy.outputs.pages-deployment-url }}
deployment_alias_url: ${{ steps.deploy.outputs.pages-deployment-alias-url }}
steps:
- name: Download build artifact
uses: actions/download-artifact@v5
with:
name: dist-files
path: src/dist
- name: Deploy to Cloudflare Pages
id: deploy
uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65 # v3.14.1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy src/dist --project-name=${{ vars.CLOUDFLARE_PROJECT_NAME }} --branch=${{ inputs.branch_name }} --commit-dirty=true