-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (52 loc) · 2.09 KB
/
deploy.yml
File metadata and controls
58 lines (52 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Deploy to GitHub Pages
on:
push:
branches: ["master"]
workflow_dispatch:
# Writes to the gh-pages branch (paired with pr-preview.yml so PR previews
# can live alongside production at /pr-preview/pr-N/). Pages source must be
# set to "Deploy from a branch: gh-pages / (root)" — see scripts or run:
# gh api -X PUT repos/$OWNER/$REPO/pages \
# -f 'source[branch]=gh-pages' -f 'source[path]=/' -f build_type=legacy
permissions:
contents: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
# Stage only the served files into _site/ so that:
# 1. The repo's root .gitignore (which ignores install.sh) is NOT
# shipped to gh-pages — otherwise the action's `git add --all`
# runs inside a tree that ignores the very file we're trying
# to publish, and `agentlinux.org/install.sh` 404s.
# 2. Repo bloat (plugin/, .planning/, docs/, etc.) does not get
# published at agentlinux.org/<dir>/.
# Pattern 5 (Pitfall 7 anti-drift): install.sh comes from the single
# editable source at packaging/curl-installer/install.sh.
- name: Assemble site bundle
run: |
mkdir -p _site
cp packaging/curl-installer/install.sh _site/install.sh
cp index.html _site/
cp CNAME _site/
cp sitemap.xml _site/
cp robots.txt _site/
cp -r assets _site/
- name: Deploy to gh-pages branch
# Pinned to v4.8.0 — the first release on Node.js 24 runtime.
# GitHub forces Node 24 from 2026-06-02; @v4 floats but pinning here
# keeps the upgrade explicit in git history.
uses: JamesIves/github-pages-deploy-action@v4.8.0
with:
folder: _site
branch: gh-pages
# clean-exclude protects pr-preview/* from being wiped by prod deploys.
# Without this, every push to master would delete all open PR previews.
clean-exclude: |
pr-preview/
single-commit: true