Skip to content
This repository has been archived by the owner on Feb 4, 2024. It is now read-only.

We got in, jibbie! :) #38

We got in, jibbie! :)

We got in, jibbie! :) #38

name: Build and Deploy Site to GitHub Pages
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set environment variable
run: echo "ELEVENTY_ENV=production" >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: npm ci
- name: Build site with 11ty
run: npx @11ty/eleventy
- name: Check built artifacts
run: ls -l _site
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v2
with:
name: github-pages
path: _site
# Deploy job
deploy:
# Add a dependency to the build job
needs: build
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2 # or the latest "vX.X.X" version tag for this action