Skip to content

🎨 update deployment workflow to streamline pnpm installation and … #310

🎨 update deployment workflow to streamline pnpm installation and …

🎨 update deployment workflow to streamline pnpm installation and … #310

Workflow file for this run

name: Deploy to Cloudflare Pages
on:
push:
branches:
- blog
paths-ignore:
- /.idea/**
jobs:
build_site:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: build
env:
BASE_PATH: '/${{ github.event.repository.name }}'
run: pnpm run build
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: blog
path: 'build/'
deploy:
needs: build_site
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/[email protected]
with:
name: blog
path: './build'
- name: Deploy to Cloudflare Pages with Wrangler
uses: cloudflare/[email protected]
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
command: pages deploy ./build --project-name=${{ github.ref_name }}