generated from actions/typescript-action
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.yml
32 lines (30 loc) · 1 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
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Cloudflare Pages Deploy
on:
push:
branches:
- $default-branch
pull_request:
branches:
- $default-branch
jobs:
deploy:
permissions:
actions: read # Only required for private GitHub Repo
contents: read
deployments: write
pull-requests: write
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: 'Checkout Github Action'
uses: actions/checkout@v4
- name: 'Deploy to Cloudflare Pages'
uses: andykenward/github-actions-cloudflare-pages@v2.3.2
with:
cloudflare-api-token: ${{ secrets.CLOUDFLARE_API_TOKEN }}
cloudflare-account-id: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
cloudflare-project-name: ${{ vars.CLOUDFLARE_PROJECT_NAME }}
directory: dist
github-token: ${{ secrets.GITHUB_TOKEN }}
github-environment: ${{ (github.ref == 'refs/heads/main' && 'production') || 'preview' }}