Workflows now trigger on both successful workflow runs and manual dispatch events. Increased timeout and moved permissions block for functions-dn workflow to align with job configuration.
37 lines
927 B
YAML
37 lines
927 B
YAML
name: Deploy to Cloudflare Pages
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows: ["Sync to Pages and Functions"]
|
|
types:
|
|
- completed
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
permissions:
|
|
contents: read
|
|
deployments: write
|
|
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
|
|
|
|
steps:
|
|
- name: Checkout pages branch
|
|
uses: actions/checkout@v6
|
|
with:
|
|
ref: pages
|
|
|
|
- name: Deploy to Cloudflare Pages
|
|
uses: cloudflare/wrangler-action@v3
|
|
with:
|
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
|
command: pages deploy . --project-name=xget --branch=${{ github.ref_name }}
|