Skip to content

adds deploy workflow #1

adds deploy workflow

adds deploy workflow #1

Workflow file for this run

name: Deploy to Cloudflare Pages
on:
push:
tags:
- "v*.*.*"
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
run: npm install
- name: Build the project
run: npm run build
- name: Deploy to Cloudflare Pages
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_PROJECT_NAME: ${{ secrets.CLOUDFLARE_PROJECT_NAME }}
run: npx wrangler pages publish apps/vitejs/dist/ --project-name $CLOUDFLARE_PROJECT_NAME --account-id $CLOUDFLARE_ACCOUNT_ID --api-token $CLOUDFLARE_API_TOKEN