name: Eleventy Build
on:
  push:
    branches:
      - main

jobs:
  build_deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - name: Setup Node
        uses: actions/setup-node@v1
        with:
          node-version: '22.x'

      - run: npm install
      - run: npm run build


      - name: Deploy
        uses: peaceiris/actions-gh-pages@v3
        with:
          publish_dir: dist
          publish_branch: gh-pages
          github_token: ${{ secrets.GITHUB_TOKEN }}