Changed Cloudflare Pages and EdgeOne Pages workflows to trigger on successful completion of the 'Sync to Pages' workflow for the main branch, instead of on push to pages branch. Also updated permissions and job names for clarity and consistency.
40 lines
883 B
YAML
40 lines
883 B
YAML
name: Deploy to EdgeOne Pages
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows: ["Sync to Pages"]
|
|
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' }}
|
|
|
|
steps:
|
|
- name: Checkout pages branch
|
|
uses: actions/checkout@v5
|
|
with:
|
|
ref: pages
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '22.11.0'
|
|
|
|
- name: Deploy to EdgeOne Pages
|
|
run: npx edgeone pages deploy . -n xget-pages -t ${{ secrets.EDGEONE_API_TOKEN }}
|
|
env:
|
|
EDGEONE_API_TOKEN: ${{ secrets.EDGEONE_API_TOKEN }}
|