Skip to content

gh workflow

gh workflow #10

Workflow file for this run

name: Preview
on:
pull_request:
branches: [main]
concurrency:
group: preview-${{ github.ref }}
cancel-in-progress: true
jobs:
preview:
if: vars.CLOUDFLARE_PAGES_PROJECT != ''
runs-on: ubuntu-24.04
timeout-minutes: 10
environment: preview
permissions:
contents: read
deployments: write
pull-requests: write
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '22'
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm build:preview
- uses: cloudflare/wrangler-action@ebbaa1584979971c8614a24965b4405ff95890e0 # v4.0.0
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy dist --project-name ${{ vars.CLOUDFLARE_PAGES_PROJECT }} --branch="${{ github.head_ref }}"
gitHubToken: ${{ github.token }}