Skip to content

Update deploy-to-cf.yaml #16

Update deploy-to-cf.yaml

Update deploy-to-cf.yaml #16

Workflow file for this run

name: Deploy to Cloudflare Workers
on:
workflow_dispatch:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Checkout 🧳
uses: actions/checkout@v3
- name: Install Node.js πŸ”₯
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install pnpm πŸ‘€
uses: pnpm/action-setup@v2
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory πŸͺ
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache πŸ’°
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies ⏬
run: pnpm install
# Deploy
- name: Deploy πŸš€
run: pnpm run deploy
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}