Phase 5 part 5: check the live site after a merge
Merged Sites pages are checked on the live site until they answer with their own words and title; removed ones until they're gone. The SEO loop, the page, the signal's page and Sites → Publishing check (or Check now); two hours without the page points at the deploy hook. Pages going live or away go to IndexNow. Sites → Publishing lists what's waiting, open pull requests and recent merges. Schema 24. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
{{define "content"}}{{with .Data}}{{$d := .}}
|
||||
<div class="heading"><h1>Publishing</h1></div>
|
||||
<p class="lede">Merging a pull request on Gitea publishes it: your Gitea hook deploys the site. Supermarket follows its pull requests, and after a merge checks the live site until the page is there, with its title and its own words, or, for a removal, gone. It checks every 30 minutes, and whenever you open the page.</p>
|
||||
|
||||
{{if not .Sites}}
|
||||
<section class="card empty"><p>Add your website and its Hugo repository under <a href="/settings/profile">Settings → Profile</a> first.</p></section>
|
||||
{{else}}
|
||||
{{if gt (len .Sites) 1}}<nav class="tabs">{{range .Sites}}<a href="/sites/publishing?site={{.Index}}" {{if and $d.Current (eq .Index $d.Current.Index)}}aria-current="page"{{end}}>{{.URL}}</a>{{end}}</nav>{{end}}
|
||||
{{with .Current}}
|
||||
{{if .Err}}<section class="card"><p class="warn-text">{{.URL}}: {{.Err}}.</p></section>{{else}}
|
||||
|
||||
<h2>Waiting for the live site</h2>
|
||||
{{with $d.Waiting}}
|
||||
<div class="table-wrap"><table>
|
||||
<thead><tr><th>Page</th><th>Merged</th><th>Last check</th></tr></thead>
|
||||
<tbody>{{range .}}<tr>
|
||||
<td><a href="/sites/pages/{{.ID}}">{{or .Title .Path}}</a><br><span class="small muted">{{.Address}}</span></td>
|
||||
<td class="small">{{if eq .Status "removed"}}removal {{end}}{{if not .MergedAt.IsZero}}{{ago .MergedAt}}{{end}}</td>
|
||||
<td class="small">{{if .Late $d.Now}}<span class="warn-text">{{.LiveNote}} Over two hours since the merge: check that the deploy ran.</span>{{else}}{{or .LiveNote "Not checked yet."}}{{end}}</td>
|
||||
</tr>{{end}}</tbody>
|
||||
</table></div>
|
||||
{{else}}<p class="help">Nothing waiting: every merged page is on the live site.</p>{{end}}
|
||||
|
||||
{{with $d.Open}}
|
||||
<h2>Pull requests waiting for you</h2>
|
||||
<ul class="items">{{range .}}<li class="item"><a href="/sites/pages/{{.ID}}">{{or .Title .Path}}</a> {{template "page-status" .}}
|
||||
{{if eq .Status "removing"}}<a class="small" href="{{.RemovalPRURL}}" target="_blank" rel="noopener noreferrer">the pull request ↗</a>{{else}}<a class="small" href="{{.PRURL}}" target="_blank" rel="noopener noreferrer">the pull request ↗</a>{{end}}</li>{{end}}</ul>
|
||||
{{end}}
|
||||
|
||||
<h2>Recent merges</h2>
|
||||
{{with $d.PullsErr}}<p class="warn-text">Couldn't read the pull requests from Gitea: {{.}}</p>{{end}}
|
||||
{{if not $d.Gitea}}<p class="help">Save a Gitea token under <a href="/settings/search">Settings → Search engines</a> to see them.</p>
|
||||
{{else}}{{with $d.Merges}}
|
||||
<div class="table-wrap"><table>
|
||||
<thead><tr><th>Merged</th><th>Pull request</th><th>From</th><th>On the live site</th></tr></thead>
|
||||
<tbody>{{range .}}<tr>
|
||||
<td class="small">{{with .MergedAt}}{{ago .}}{{end}}</td>
|
||||
<td><a href="{{.HTMLURL}}" target="_blank" rel="noopener noreferrer">{{.Title}}</a><br><span class="small muted">{{.Head.Ref}}</span></td>
|
||||
<td class="small">{{if .Ours}}Supermarket{{else}}{{.User.Login}}{{end}}</td>
|
||||
<td class="small">{{with .Page}}<a href="/sites/pages/{{.ID}}">{{template "page-status" .}}</a>{{else}}<span class="muted">—</span>{{end}}</td>
|
||||
</tr>{{end}}</tbody>
|
||||
</table></div>
|
||||
<p class="small muted">SEO changes and briefs follow their own pages to the live site, under SEO → Changes and Briefs and pages.</p>
|
||||
{{else}}<p class="help">No merged pull requests yet. Changes pushed straight to the published branch aren't pull requests: they're under <a href="/sites?site={{$d.Current.Index}}">Sections and pages</a>, in the latest commits.</p>{{end}}{{end}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{end}}{{end}}
|
||||
Reference in New Issue
Block a user