-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (70 loc) · 2.79 KB
/
Copy pathpages.yaml
File metadata and controls
80 lines (70 loc) · 2.79 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Publish the documentation to GitHub Pages so it is INDEXABLE.
#
# The GitHub wiki was not: GitHub serves every /wiki/ URL with `X-Robots-Tag: none` (noindex,
# nofollow at the HTTP level), so nothing there could appear in a search engine or the crawlers
# behind AI search. Pages carries no such header. The guide pages therefore now live in the repo
# under docs/guide/ and the wiki is retired, so there is ONE copy of each document and no chance
# of the two drifting apart.
name: Docs site
on:
push:
branches: [main]
paths:
- docs-site/**
- docs/guide/**
- firmware/docs/**
- reverse-engineering/docs/**
- README.md
- .github/workflows/pages.yaml
- .github/scripts/assemble_docs_site.py # the assembler IS the build; changing it must rebuild
pull_request: # build-only on PRs: catches a broken site config BEFORE it reaches main
paths:
- docs-site/**
- docs/guide/**
- firmware/docs/**
- reverse-engineering/docs/**
- .github/workflows/pages.yaml
- .github/scripts/assemble_docs_site.py
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Assemble the site
run: |
python3 .github/scripts/assemble_docs_site.py
- uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
- uses: actions/jekyll-build-pages@44a6e6beabd48582f863aeeb6cb2151cc1716697 # v1.0.13
with:
source: ./_site_src
destination: ./_site
- uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
deploy:
needs: build
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
# Tell IndexNow the site changed, instead of waiting to be crawled. Runs AFTER deploy so the
# URLs (and the key file it verifies) are actually live. The key is not a secret: engines
# authenticate by fetching it from the site, which is why it is committed rather than stored
# as a repo secret. Never allowed to fail the workflow -- a submission endpoint being down
# says nothing about whether the site published.
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Ping IndexNow
continue-on-error: true
env:
INDEXNOW_KEY: 851d5c2c194e53141e515a7c9f456d91
run: python3 .github/scripts/indexnow_ping.py