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
7 changes: 5 additions & 2 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ name: Deploy GitHub Pages
# deliberately NOT wired to push-to-main right now. site/ currently holds
# a redesign that's still mid review/design-pass; auto-deploying on every
# main merge shipped it to netscli.com prematurely once already. Restore
# the `push: branches: [main], paths: ['site/**', ...]` trigger once the
# redesign is actually approved to ship, then deploys resume automatically.
# the push trigger once the redesign is actually approved to ship, then
# deploys resume automatically. Copy the `paths:` list from site.yml rather
# than writing `['site/**']`: the build also reads CHANGELOG.md,
# scripts/install.ps1, scripts/install.sh and apps/netscli-gui/package.json,
# so a site/**-only filter would leave changes to those undeployed.
#
# Until then: Actions tab → Deploy GitHub Pages → Run workflow, or
# `gh workflow run pages.yml`.
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/site-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ on:
branches: [main]
paths:
- 'site/**'
- 'CHANGELOG.md'
- 'scripts/install.ps1'
- 'scripts/install.sh'
- 'apps/netscli-gui/package.json'
- '.github/workflows/site-preview.yml'
# Keep a `main` preview that tracks main, so there is always somewhere to
# see the site as it currently is. It cannot come from the PR path: that
Expand All @@ -35,6 +39,10 @@ on:
branches: [main]
paths:
- 'site/**'
- 'CHANGELOG.md'
- 'scripts/install.ps1'
- 'scripts/install.sh'
- 'apps/netscli-gui/package.json'
- '.github/workflows/site-preview.yml'

concurrency:
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,19 @@ name: Site
on:
push:
branches: [main]
# Not just site/. The build reads four files from outside it: CHANGELOG.md
# (changelog.astro imports it with ?raw), scripts/install.ps1 and
# scripts/install.sh (served at /install.ps1 and /install.sh), and
# apps/netscli-gui/package.json (site-content/version.ts reads the version
# from it). Keep this list, the `changes` job's grep below, and
# site-preview.yml's two filters in step -- they are the same list three
# times and a media query cannot read a variable here either.
paths:
- 'site/**'
- 'CHANGELOG.md'
- 'scripts/install.ps1'
- 'scripts/install.sh'
- 'apps/netscli-gui/package.json'
# NOTE: deliberately unfiltered, unlike the push trigger above. `Site
# Gate` below is a required status check, and a required check that
# never *reports* leaves a PR stuck on "Expected — waiting for status"
Expand Down Expand Up @@ -51,7 +62,8 @@ jobs:
echo "Changed files:"
echo "$files" | sed 's/^/ /'

if echo "$files" | grep -qE '^site/'; then
# Same set as the push trigger's paths list above.
if echo "$files" | grep -qE '^(site/|CHANGELOG\.md$|scripts/install\.(ps1|sh)$|apps/netscli-gui/package\.json$)'; then
echo "site=true" >> "$GITHUB_OUTPUT"
else
echo "site=false" >> "$GITHUB_OUTPUT"
Expand Down