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
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Deploy to GitHub Pages
on:
push:
branches: [main]
# Daily, so WebPC upgrades (published by github.com/codemug/webpc) reach the site.
# Daily rebuild of the site. WebPC upgrades arrive by bumping webpc.version.
schedule:
- cron: "0 5 * * *"
workflow_dispatch:
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
- name: Build
run: npm run build

# WebPC (/pc/) is built and tested in github.com/codemug/webpc; add its latest build.
# WebPC (/pc/) is built and tested in github.com/codemug/webpc; add the version in webpc.version.
- name: Add WebPC
run: npm run webpc

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ The full original deck is not bundled with the tracked source, so full regenerat

## WebPC

WebPC, the browser desktop at `/pc/`, is its own project: [codemug/webpc](https://github.com/codemug/webpc). There, a YAML catalog pins every app, a weekly workflow upgrades them after tests and smoke checks, and CI publishes each tested build as the `latest-dist` release. This site's deploy downloads that build after `astro build`, and runs daily so upgrades go live. The navigation link lives in `src/layouts/Base.astro`.
WebPC, the browser desktop at `/pc/`, is its own project: [codemug/webpc](https://github.com/codemug/webpc). There, a YAML catalog pins every app, a weekly workflow upgrades them after tests and smoke checks, and every tested push to its main updates a draft of the next version. This site's deploy downloads the published version pinned in `webpc.version` after `astro build`; to upgrade WebPC, publish the draft there and bump that file in a pull request. The navigation link lives in `src/layouts/Base.astro`.

## Contact

Expand Down
12 changes: 7 additions & 5 deletions scripts/fetch-webpc.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!/usr/bin/env bash
# Add WebPC to the built site. WebPC lives in github.com/codemug/webpc; its CI publishes each
# tested build of main as the "latest-dist" release. This downloads that build, checks it against
# its published SHA-256, and extracts pc/ and third-party/ into dist/ (served at /pc/).
# Add WebPC to the built site. WebPC lives in github.com/codemug/webpc and publishes versioned
# releases. This downloads the version pinned in webpc.version, checks it against its published
# SHA-256, and extracts pc/ and third-party/ into dist/ (served at /pc/). To upgrade WebPC, bump
# webpc.version in a pull request.
# Usage: npm run build && npm run webpc
set -euo pipefail
cd "$(dirname "$0")/.."
base="${WEBPC_RELEASE_URL:-https://github.com/codemug/webpc/releases/download/latest-dist}"
version=$(tr -d ' \n' < webpc.version)
base="${WEBPC_RELEASE_URL:-https://github.com/codemug/webpc/releases/download/${version}}"
test -d dist || { echo "fetch-webpc: run npm run build first" >&2; exit 1; }
mkdir -p .webpc
for name in webpc-dist.tar.gz webpc-dist.tar.gz.sha256 webpc-build.json; do
Expand All @@ -20,4 +22,4 @@ if [ "$expected" != "$actual" ]; then
fi
rm -rf dist/pc dist/third-party
tar -xzf .webpc/webpc-dist.tar.gz -C dist pc third-party
echo "fetch-webpc: added WebPC $(cat .webpc/webpc-build.json) to dist/ ($(du -sh dist/pc | cut -f1))"
echo "fetch-webpc: added WebPC ${version} $(cat .webpc/webpc-build.json) to dist/ ($(du -sh dist/pc | cut -f1))"
1 change: 1 addition & 0 deletions webpc.version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v0.1.0