Skip to content

Added CYO instructions to README #31

Added CYO instructions to README

Added CYO instructions to README #31

name: Build and deploy to Cloudflare Pages
on: push
jobs:
build-and-deploy:
runs-on: ubuntu-22.04
container:
image: node:20.15.1
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install dependencies
run: npm install
- name: Build website
run: npx @11ty/eleventy
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: 11ty-website
if-no-files-found: error
path: site/
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Deploy to Cloudflare Pages
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy site --project-name=${{ vars.CLOUDFLARE_PAGES_PROJECT_NAME }} --branch=${{ steps.extract_branch.outputs.branch }} --commit-dirty=true