feat: make OpenAdapt the canonical openadapt-flow launcher #16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Noncanonical docs guard | |
| # docs.openadapt.ai is built and deployed by OpenAdaptAI/openadapt-ops from the | |
| # local openadapt-maintenance checkout. This repository only notifies that | |
| # pipeline through notify-docs.yml; it must never publish a competing Pages | |
| # artifact or claim the canonical custom domain. | |
| on: | |
| pull_request: | |
| paths: | |
| - "docs/**" | |
| - "mkdocs.yml" | |
| - ".github/workflows/docs.yml" | |
| push: | |
| branches: [main] | |
| paths: | |
| - "docs/**" | |
| - "mkdocs.yml" | |
| - ".github/workflows/docs.yml" | |
| permissions: | |
| contents: read | |
| jobs: | |
| guard: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Refuse a second docs.openadapt.ai publisher | |
| shell: bash | |
| run: | | |
| test ! -e docs/CNAME | |
| python - <<'PY' | |
| from pathlib import Path | |
| source = Path(".github/workflows/docs.yml").read_text() | |
| forbidden = ( | |
| "actions/" + "deploy-pages", | |
| "actions/" + "upload-pages-artifact", | |
| ) | |
| assert not any(item in source for item in forbidden) | |
| PY | |
| grep -qi "noncanonical" docs/index.md | |
| grep -q "openadapt-maintenance" docs/index.md |