Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Publish site

# Builds the static site and publishes it to GitHub Pages.
# Pull requests run the checks only; pushes to main also deploy.
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

permissions:
contents: read

# One deployment at a time; let an in-flight deploy finish rather than cancel it.
concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out
uses: actions/checkout@v4

- name: Validate links, alt text, and titles
run: python3 scripts/check-site.py

- name: Assemble site
run: |
mkdir _site
cp index.html 404.html robots.txt .nojekyll _site/
cp -r assets blog _site/
find _site -type f | sort

- name: Configure Pages
if: github.event_name != 'pull_request'
uses: actions/configure-pages@v5

- name: Upload artifact
if: github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@v3
with:
path: _site

deploy:
if: github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Source material, not part of the published site (the bio contains a birthday)
Michael Vance.md
michael-vance-builder-pixel-art.jpg
.remember/
_site/
.DS_Store
Empty file added .nojekyll
Empty file.
33 changes: 33 additions & 0 deletions 404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Page not found | Michael Vance</title>
<meta name="robots" content="noindex">
<link rel="icon" href="/assets/favicon.svg" type="image/svg+xml">
<style>
body{margin:0;min-height:100vh;display:grid;place-items:center;background:#f3ebdb;color:#2b2118;font-family:Georgia,serif;text-align:center;padding:1rem}
h1{font-size:clamp(2.2rem,6vw,3.5rem);margin:.2rem 0}
code{font-family:ui-monospace,Menlo,monospace;background:#f0b81f;padding:.1em .4em;border:2px solid #2b2118;border-radius:4px}
a{color:#1d3b63;font-weight:700}
@media (prefers-color-scheme:dark){body{background:#101c2e;color:#efe6d3}a{color:#8fb6ee}}
</style>
</head>
<body>
<main>
<p><code>ERR 404</code></p>
<h1>Measured twice, cut once. This page isn't here.</h1>
<p>The board you were looking for was never milled.</p>
<p><a id="home" href="/">Back to the workbench</a></p>
<script>
// This is a project site served from /michaelvance0092.github.io/, so root-relative links need that prefix.
(function () {
var base = location.pathname.indexOf('/michaelvance0092.github.io/') === 0 ? '/michaelvance0092.github.io/' : '/';
document.getElementById('home').href = base;
document.querySelector('link[rel=icon]').href = base + 'assets/favicon.svg';
})();
</script>
</main>
</body>
</html>
Loading
Loading