Skip to content

Update works.jsx

Update works.jsx #30

Workflow file for this run

name: Deploy React App and Worker to Cloudflare
on:
push:
branches:
- main
paths:
- frontstage/**
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "18.17.0"
- name: Install dependencies
run: npm install
working-directory: ./frontstage
- name: Build the project
run: npm run build
working-directory: ./frontstage # Corrected syntax
- name: Deploy to Cloudflare Pages
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: taiwan-public-art-information
directory: ./.next
command: pages deploy ./frontstage/.next/static --project-name=taiwan-public-art-information --commit-dirty=true
quiet: false
deploy_worker:

Check failure on line 43 in .github/workflows/deploy.yaml

View workflow run for this annotation

GitHub Actions / Deploy React App and Worker to Cloudflare

Invalid workflow file

The workflow is not valid. .github/workflows/deploy.yaml (Line: 43, Col: 1): Unexpected value 'deploy_worker'
runs-on: ubuntu-latest
needs: build_and_deploy
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Deploy Worker to Cloudflare
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: wrangler publish
env:
CF_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}