Skip to content

Create deploy.yml

Create deploy.yml #1

Workflow file for this run

# https://github.com/andykenward/github-actions-cloudflare-pages
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: 'Deployment'
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
deploy:
permissions:
actions: read # Only required for private GitHub Repo
contents: read
deployments: write
pull-requests: write
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node_version: 20
- run: npm ci
run: npm run build

Check failure on line 27 in .github/workflows/deploy.yml

View workflow run for this annotation

GitHub Actions / Deployment

Invalid workflow file

The workflow is not valid. .github/workflows/deploy.yml (Line: 27, Col: 9): 'run' is already defined
- name: Deploy to Cloudflare Pages
uses: andykenward/[email protected]
id: pages
with:
cloudflare-api-token: ${{ secrets.CLOUDFLARE_API_TOKEN }}
cloudflare-account-id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
cloudflare-project-name: tw-anscheck
directory: /
github-token: ${{ secrets.GITHUB_TOKEN }}
github-environment: ${{ (github.ref == 'refs/heads/main' && '(Production)') || '(Preview)' }}