Skip to content

feat: workflow cancel previous job #6

feat: workflow cancel previous job

feat: workflow cancel previous job #6

name: Cloudflare Pages Deployment
on:
workflow_dispatch:
push:
branches:
- main
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
deployment:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: latest
run_install: false
- name: Install project dependencies
run: pnpm install
- name: Build Project
run: pnpm build
- name: Deploy Project to Cloudflare Pages
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy --project-name=website ./dist