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
2 changes: 1 addition & 1 deletion .claude/template-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.9.5
1.9.6
35 changes: 28 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
is_browser_extension: ${{ steps.archetype.outputs.is_browser_extension }}
is_wordpress_theme: ${{ steps.archetype.outputs.is_wordpress_theme }}
steps:
- name: Check out the code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand All @@ -76,6 +77,13 @@ jobs:
# website at all — nothing for GitHub Pages to serve — so this
# entire workflow is a deliberate no-op for that archetype, not a
# weakened deploy. See jacob-ci-archetypes.md section 2c.
#
# A wordpress-theme project is the same kind of no-op for a
# different reason: it has no root package.json for this job's
# Node setup/npm ci steps, and it is never published via GitHub
# Pages at all. It deploys to a real WordPress server through a
# separate, manual, cookie-authenticated admin upload process, so
# this workflow has nothing to build or publish for this archetype.
id: archetype
run: |
if [ -f .github/ci-archetype ]; then
Expand All @@ -88,6 +96,11 @@ jobs:
else
echo "is_browser_extension=false" >> "$GITHUB_OUTPUT"
fi
if [ "$value" = "wordpress-theme" ]; then
echo "is_wordpress_theme=true" >> "$GITHUB_OUTPUT"
else
echo "is_wordpress_theme=false" >> "$GITHUB_OUTPUT"
fi

- name: Note that browser-extension projects have nothing to deploy
if: steps.archetype.outputs.is_browser_extension == 'true'
Expand All @@ -96,23 +109,31 @@ jobs:
echo "A browser extension has no public website for GitHub Pages to"
echo "serve, so this workflow is a deliberate no-op for this archetype."

- name: Note that wordpress-theme projects have nothing to deploy
if: steps.archetype.outputs.is_wordpress_theme == 'true'
run: |
echo "This project's .github/ci-archetype declares wordpress-theme."
echo "A WordPress theme deploys to a WordPress server via a separate"
echo "manual admin upload process, not GitHub Pages, so this workflow"
echo "is a deliberate no-op for this archetype."

- name: Set up Node.js
if: steps.archetype.outputs.is_browser_extension != 'true'
if: steps.archetype.outputs.is_browser_extension != 'true' && steps.archetype.outputs.is_wordpress_theme != 'true'
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: lts/*
cache: npm

- name: Install dependencies
if: steps.archetype.outputs.is_browser_extension != 'true'
if: steps.archetype.outputs.is_browser_extension != 'true' && steps.archetype.outputs.is_wordpress_theme != 'true'
run: npm ci

- name: Build
# --if-present no-ops when the project has no "build" script (a
# bundler-free static-app project with a package.json for tooling
# only, e.g. Braille Reference). Without --if-present, npm exits
# non-zero with "Missing script: build" and the deploy fails.
if: steps.archetype.outputs.is_browser_extension != 'true'
if: steps.archetype.outputs.is_browser_extension != 'true' && steps.archetype.outputs.is_wordpress_theme != 'true'
run: npm run build --if-present

- name: Assemble the deploy artifact
Expand Down Expand Up @@ -147,7 +168,7 @@ jobs:
# unanchored 'data/***' also matches node_modules/css-tree/data/*,
# silently publishing node_modules internals to the public site.
id: artifact
if: steps.archetype.outputs.is_browser_extension != 'true'
if: steps.archetype.outputs.is_browser_extension != 'true' && steps.archetype.outputs.is_wordpress_theme != 'true'
run: |
if [ -d dist ]; then
echo "path=dist" >> "$GITHUB_OUTPUT"
Expand All @@ -169,18 +190,18 @@ jobs:
fi

- name: Configure Pages
if: steps.archetype.outputs.is_browser_extension != 'true'
if: steps.archetype.outputs.is_browser_extension != 'true' && steps.archetype.outputs.is_wordpress_theme != 'true'
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0

- name: Upload Pages artifact
if: steps.archetype.outputs.is_browser_extension != 'true'
if: steps.archetype.outputs.is_browser_extension != 'true' && steps.archetype.outputs.is_wordpress_theme != 'true'
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: ${{ steps.artifact.outputs.path }}

deploy:
needs: build
if: needs.build.outputs.is_browser_extension != 'true'
if: needs.build.outputs.is_browser_extension != 'true' && needs.build.outputs.is_wordpress_theme != 'true'
runs-on: ubuntu-latest
environment:
name: github-pages
Expand Down