28 lines
753 B
YAML
28 lines
753 B
YAML
name: Deploy to Cloudflare Pages
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '18'
|
|
|
|
- name: Install Wrangler
|
|
run: npm install -g wrangler
|
|
|
|
- name: Authenticate with Cloudflare
|
|
run: wrangler auth login --api-token ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
|
|
- name: Deploy to Pages
|
|
run: wrangler pages deploy dist --project-name test --branch master
|
|
# Replace 'dist' with your build output directory (e.g., 'build' for React).
|
|
# If building is needed, add a step like: run: npm run build |