Skip to content

Deploy Nuxt.js site to CloudFlare Pages #2

Deploy Nuxt.js site to CloudFlare Pages

Deploy Nuxt.js site to CloudFlare Pages #2

Workflow file for this run

# Based on https://github.com/actions/starter-workflows/blob/main/pages/nuxtjs.yml
name: Deploy Nuxt.js site to CloudFlare Pages
on:
push:
branches: ["main"]
workflow_dispatch:
permissions:
contents: read
deployments: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Restore cache
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-nuxt-build-v3-${{ hashFiles('bun.lockb') }}
restore-keys: ${{ runner.os }}-nuxt-build-v3-
- name: Install dependencies
run: bun install
- name: Build with Nuxt.js
run: bun run generate
- name: Deploy to CloudFlare Pages
uses: cloudflare/pages-action@1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: manzanita-cecchetti-xyz
directory: .output/public
gitHubToken: ${{ secrets.GITHUB_TOKEN }}