Skip to content

Eleventy Build

Eleventy Build #7

name: Eleventy Build
on:
push:
branches:
- main # Adjust if your default branch is different
workflow_dispatch: # Allows manual triggering
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install dependencies
run: npm ci
- name: Build site with Eleventy
run: npm run deploy # Ensure this script is set up in package.json
- name: Upload artifact for deployment
uses: actions/upload-pages-artifact@v2
with:
path: _site # Change this if your output folder is different
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v2