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
15 changes: 15 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,18 @@ jobs:
- name: Publish the exact Pages artifact
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4
- name: Verify anonymous live pages match the deployed artifact
env:
SITE_URL: ${{ steps.deployment.outputs.page_url }}
run: |
test "$SITE_URL" = 'https://valgorithms.github.io/YoutubePHP/'
for page in index.html classes/YouTube-YouTube.html guides/index.html guides/github-actions-uploader.html guides/civ13-uploader-example.html guides/publishing.html graphs/classes.svg; do
relative="$page"
if [ "$page" = index.html ]; then relative=''; fi
status="$(curl -q --proto '=https' --tlsv1.2 --fail --silent --show-error \
--connect-timeout 10 --max-time 20 --retry 3 --retry-delay 5 --retry-max-time 60 \
--output "$RUNNER_TEMP/docs-readback" --write-out '%{http_code}' "$SITE_URL$relative")"
test "$status" = 200
cmp "site/$page" "$RUNNER_TEMP/docs-readback"
printf 'Verified anonymous HTTP 200 and exact artifact bytes: %s\n' "$page"
done
6 changes: 6 additions & 0 deletions docs/publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ API reference, uploader guide and case study. Source generation alone is not a
live deployment. The default address is
`https://valgorithms.github.io/YoutubePHP/`.

The publisher checks seven live pages/resources with anonymous HTTPS requests,
requires HTTP 200 and compares each response byte-for-byte with the deployed
artifact. Requests have bounded timeouts/retries and no authentication or cookies.
This also provides readback when an operator's local network cannot reach the
Pages hostname. A successful upload to Pages alone does not pass that check.

References: [phpDocumentor configuration](https://docs.phpdoc.org/guide/references/configuration.html),
[custom Pages workflows](https://docs.github.com/en/pages/getting-started-with-github-pages/using-custom-workflows-with-github-pages),
[Pages publishing source](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site).
Loading