Skip to content
Merged
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
70 changes: 70 additions & 0 deletions .github/workflows/casket-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# SPDX-License-Identifier: MPL-2.0
#
# GitHub Pages deployment.
#
# This repository has Pages configured with build_type "workflow", but carried
# no Pages workflow — so the build never ran and the site was never published.
# https://hyperpolymath.github.io/nesy-solver/ returned 404 for the site root
# and for /.well-known/security.txt alike.
#
# WHY THIS STAGES A SUBSET RATHER THAN PUBLISHING THE REPOSITORY ROOT
#
# index.html references /public/styles.css and /public/app.js, and the site
# needs .well-known/ at its root. Those three things, plus the entry page, are
# what is staged. Publishing the repository root instead would serve 45 root
# files — AUDIT.adoc, Containerfile, server.js, wrangler.toml and the rest —
# none of which is site content.
name: GitHub Pages

on:
push:
branches: [main]
workflow_dispatch:

permissions:
contents: read
pages: write

Check warning on line 26 in .github/workflows/casket-pages.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Move this write permission from workflow level to job level.

See more on https://sonarcloud.io/project/issues?id=hyperpolymath_nesy-solver&issues=AaC02w8xZgA6hq4sfQqz&open=AaC02w8xZgA6hq4sfQqz&pullRequest=69
id-token: write

Check warning on line 27 in .github/workflows/casket-pages.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Move this write permission from workflow level to job level.

See more on https://sonarcloud.io/project/issues?id=hyperpolymath_nesy-solver&issues=AaC02w8xZgA6hq4sfQq0&open=AaC02w8xZgA6hq4sfQq0&pullRequest=69

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

- name: Stage the site
run: |
set -euo pipefail
mkdir -p _site
cp index.html _site/index.html
[ -d public ] && cp -r public _site/public
# .well-known/ must sit at the ORIGIN ROOT to be discoverable
# (RFC 8615). nesy-solver.dev does not currently resolve, so nothing
# serves it today; this keeps it correct at whatever origin does.
[ -d .well-known ] && cp -r .well-known _site/.well-known
echo "staged:"
find _site -type f | sed 's/^/ /'

- name: Setup Pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5

- name: Upload artifact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
with:
path: '_site'

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4
Loading