interplane.Get Omega
Read in your language

sovereign-intelligence

Front door to Drake Stapleton's sovereign stack.

Brought by drakestapleton

branch main Branches Tags History

sovereign-intelligence / docs / site / .github / workflows / pages.yml

59 lines · 1984 bytes Raw Blame History
1name: pages
2# drakestapleton.com merged into https://www.aienos.com/engineer/ on 2026-10-26.
3# This site now only serves redirect stubs (site/), one per old address, listed
4# in redirects.tsv. GitHub Pages cannot send a 301, so each stub carries a
5# canonical link, a meta refresh at 0, location.replace and a visible link.
6on:
7 workflow_dispatch:
8 push:
9 branches: [main]
10 pull_request:
11 branches: [main]
12permissions:
13 contents: read
14 pages: write
15 id-token: write
16concurrency:
17 group: pages
18 cancel-in-progress: true
19jobs:
20 build:
21 runs-on: ubuntu-latest
22 steps:
23 - uses: actions/checkout@v4
24 - name: Every old address has its stub, pointing at its new page
25 run: |
26 set -eu
27 tab="$(printf '\t')"
28 n=0
29 while IFS="$tab" read -r old new; do
30 case "$old" in
31 *.md) f="site$old"; pat="$new" ;;
32 /) f="site/index.html"; pat="url=$new\"" ;;
33 *) f="site$old/index.html"; pat="url=$new\"" ;;
34 esac
35 if ! grep -qF "$pat" "$f"; then echo "stub missing or wrong: $old -> $new"; exit 1; fi
36 case "$old" in
37 *.md) ;;
38 *) grep -qF "<link rel=\"canonical\" href=\"$new\">" "$f" && grep -qF "location.replace(\"$new\"" "$f" && grep -qF "<a href=\"$new\">" "$f" \
39 || { echo "stub incomplete: $old"; exit 1; } ;;
40 esac
41 n=$((n + 1))
42 done < redirects.tsv
43 grep -qx 'www.drakestapleton.com' site/CNAME
44 echo "$n stubs checked"
45 - name: Upload Pages artifact
46 if: github.ref == 'refs/heads/main'
47 uses: actions/upload-pages-artifact@v3
48 with:
49 path: site
50 deploy:
51 needs: build
52 if: github.ref == 'refs/heads/main'
53 environment:
54 name: github-pages
55 url: ${{ steps.deployment.outputs.page_url }}
56 runs-on: ubuntu-latest
57 steps:
58 - id: deployment
59 uses: actions/deploy-pages@v4