Skip to content

Added better success / fail handling for contact form #27

Added better success / fail handling for contact form

Added better success / fail handling for contact form #27

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=11ty-links --branch=${{ steps.extract_branch.outputs.branch }} --commit-dirty=true