Skip to content

feat: script for creating a new website #59

feat: script for creating a new website

feat: script for creating a new website #59

Workflow file for this run

on:
push:
branches: [main]
jobs:
publish:
name: Publish to Cloudflare Pages
runs-on: ubuntu-latest
strategy:
matrix:
include:
# "project" here corresponds to the name of your project within Cloudflare
# "package" here refers to the name of the site as it is in the monorepo. "project" and "package" may not always be the same
- project: unicorn-demo
package: unicorn-demo
# Deploy multiple sites by adding more matrix entries following this syntax:
# - project: another-project
# package: another-package
# - project: third-project
# package: third-package
permissions:
contents: read
deployments: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Dependencies
run: npm ci --omit=dev
- name: Build
run: npm run build -w ./sites/${{ matrix.package }}
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.DEPLOY_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ matrix.project }}
directory: ./sites/${{ matrix.package }}/dist