Skip to content

release 0.4.3

release 0.4.3 #15

Workflow file for this run

name: pages
# Deploys the gallery — the surface the brand team reviews.
#
# With access control on, the URL is a generated *.pages.github.io subdomain
# rather than engineio.github.io/ui; `gh api repos/engineio/ui/pages --jq
# .html_url` prints the current one. Every primitive, every variant, every state, rendered by the
# package itself rather than by a copy of it.
#
# SETUP IS DELIBERATELY MANUAL, AND THIS WORKFLOW FAILS UNTIL IT IS DONE.
#
# Settings -> Pages -> Build and deployment -> Source: GitHub Actions, and then
# Visibility: Private. The repo is internal and the org is on Enterprise, so
# access control is available — without it a Pages site is PUBLIC even from a
# private or internal repo, and this one serves the brand system, the marks and
# the licensed Proxima Nova webfonts.
#
# `configure-pages` takes an `enablement: true` option that would create the
# site on first run and turn this red job green with no human involved. It is
# deliberately not used: the default visibility is public, so auto-enabling
# would publish the brand system to anyone with the URL as a side-effect of a
# push. A failing job until someone chooses the visibility is the safer
# failure.
on:
push:
branches: [main]
workflow_dispatch:
concurrency:
group: pages
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
# configure-pages reads (and with enablement, writes) the repo's Pages
# config, so this job needs pages:write — the top-level contents:read is
# not enough and the failure it gives is an opaque "Resource not accessible
# by integration".
permissions:
contents: read
pages: write
id-token: write
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Resolve the latest release tag
id: tag
run: echo "version=$(git describe --tags --abbrev=0 2>/dev/null || echo dev)" >> "$GITHUB_OUTPUT"
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.14
- run: bun install --frozen-lockfile
# No PAGES_BASE. This site has ACCESS CONTROL enabled, and a private
# Pages site is served from its own generated subdomain at the root
# (https://<generated>.pages.github.io/) rather than as a project site
# under /<repo>. Setting a base of /ui here was harmless only by luck —
# the static adapter emits relative asset URLs and the gallery is a
# single page whose only links are same-page anchors — but it would break
# every internal link the moment the gallery gains a second route.
#
# If access control is ever turned off, the URL becomes
# engineio.github.io/ui and this needs `PAGES_BASE: /ui` back.
#
# DS_VERSION labels the gallery with the release it was built from, which
# is why the checkout above is unshallow: `git describe` needs the tags.
- name: Build gallery
run: bun run build:gallery
env:
DS_VERSION: ${{ steps.tag.outputs.version }}
# No `enablement: true` — see the note at the top of this file. This step
# fails with "Resource not accessible by integration" until Pages is
# enabled by hand with its visibility chosen.
- uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v4
with:
path: build
deploy:
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
steps:
- id: deploy
uses: actions/deploy-pages@v4