diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index ae201f0..d539de9 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -9,6 +9,11 @@ on: - "robots.txt" - "sitemap.xml" - ".github/workflows/pages.yml" + # A release tag runs on refs/tags/*, which the github-pages environment does + # not allow to deploy; workflow_run executes on the default branch instead. + workflow_run: + workflows: [Release] + types: [completed] workflow_dispatch: permissions: @@ -23,6 +28,7 @@ concurrency: jobs: deploy: name: Deploy landing page + if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' runs-on: ubuntu-latest environment: name: github-pages @@ -30,14 +36,29 @@ jobs: steps: - name: Checkout uses: actions/checkout@v7 + with: + ref: ${{ github.event.repository.default_branch }} + fetch-depth: 0 + fetch-tags: true - name: Configure Pages uses: actions/configure-pages@v6 - name: Stage static site run: | + version=$(git tag --list 'v*' --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -n1) + if [ -z "$version" ]; then + echo "::error::No v.. tag found" + exit 1 + fi + echo "Landing page version: $version" mkdir -p _site cp index.html CNAME robots.txt sitemap.xml _site/ + sed -i "s/{{version}}/${version#v}/g" _site/index.html + if grep -q '{{version}}' _site/index.html; then + echo "::error::{{version}} placeholder left in index.html" + exit 1 + fi - name: Upload artifact uses: actions/upload-pages-artifact@v5 diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b6a4ca..f147b47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.ht - **Agent instructions consolidated.** `CLAUDE.md` is now the single source of agent instructions, slimmed to the rules that apply to every change — constraints, commands, binding architectural decisions, the PR workflow — with pointers into `docs/` instead of restated directory trees and endpoint lists; area-specific coding rules live in path-scoped rule files. `AGENTS.md` is a short pointer to it. The stale direct-to-main flow and per-commit approval gate are replaced by the protected-`main` PR workflow. ### Fixed +- **The landing page shows the current release, and keeps doing so.** Its header badge and footer said v0.1.6 and its structured data said 0.1.3, long after v0.4.1 shipped. The version is no longer written by hand: the Pages workflow fills it from the newest `v..` tag at deploy time and redeploys after every successful Release run. The footer also credits the author with a link to their site, and the structured-data author carries the same `@id` that site uses. - **`/metrics` authentication is documented as it behaves.** The README said the endpoint needs no authentication; it is public by default and requires `Authorization: Bearer ` once `WebhookEngine__Metrics__ScrapeToken` is set. The README and `docs/SELF-HOSTING.md` now say so and show the Prometheus `authorization` block. ### Removed diff --git a/index.html b/index.html index 2868283..87d6b37 100644 --- a/index.html +++ b/index.html @@ -47,12 +47,13 @@ }, "author": { "@type": "Person", + "@id": "https://www.sametozkan.com.tr/#person", "name": "Samet Özkan", - "url": "https://www.sametozkan.com.tr" + "url": "https://www.sametozkan.com.tr/" }, "license": "https://opensource.org/licenses/MIT", "codeRepository": "https://github.com/voyvodka/webhook-engine", - "softwareVersion": "0.1.3", + "softwareVersion": "{{version}}", "programmingLanguage": ["C#", "TypeScript"], "keywords": "webhook, delivery, .NET, ASP.NET Core, PostgreSQL, self-hosted, open source" } @@ -889,6 +890,14 @@ color: var(--dim); } + .footer-author { + color: inherit; + text-underline-offset: 0.2em; + transition: color 0.15s; + } + + .footer-author:hover { color: var(--muted); } + .footer-links { display: flex; gap: 20px; @@ -983,7 +992,7 @@ WebhookEngine - v0.1.6 + v{{version}}