From 4ee2d14927e57a26a4215776d174aacc581367be Mon Sep 17 00:00:00 2001 From: Kasun Vithanage Date: Thu, 22 Oct 2026 10:27:40 +0530 Subject: [PATCH 1/2] docs: fix HexDocs source links; add a docs-only publish workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "View source" linked blob//lib/..., missing the package's directory in the monorepo, so every link 404'd. source_url_pattern adds it. Actions → Docs republishes a package's HexDocs from main under its current version, so doc fixes like this one don't need a release. Claude-Session: https://claude.ai/code/session_012aEMFtJKJsMz1vGtbSijGR --- .github/workflows/docs.yml | 66 ++++++++++++++++++++++++++++++++++++++ README.md | 4 +++ durable/mix.exs | 3 +- durable_dashboard/mix.exs | 3 +- 4 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..0430b14 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,66 @@ +name: Docs + +# Actions → Docs → Run workflow, pick a package. Republishes its HexDocs from +# main for the version in mix.exs (its latest release), for doc fixes between +# releases. Releases publish docs on their own. Not run on every push: main +# can document unreleased APIs, which would show up under the released +# version. + +on: + workflow_dispatch: + inputs: + package: + description: Package + type: choice + options: [durable, durable_dashboard] + +env: + ELIXIR_VERSION: "1.20" + OTP_VERSION: "29" + +jobs: + docs: + name: Publish docs + if: github.ref == 'refs/heads/main' + runs-on: ubuntu-latest + defaults: + run: + working-directory: ${{ inputs.package }} + steps: + - uses: actions/checkout@v6 + + - name: Set up Elixir + uses: erlef/setup-beam@v1 + with: + elixir-version: ${{ env.ELIXIR_VERSION }} + otp-version: ${{ env.OTP_VERSION }} + + # Before the JS deps: assets/package.json links phoenix and LiveView + # from deps/. + - name: Install dependencies + run: mix deps.get + + # The dashboard's hex.publish alias builds its assets first. + - name: Set up pnpm + if: inputs.package == 'durable_dashboard' + uses: pnpm/action-setup@v6 + with: + version: 9 + + - name: Set up Node + if: inputs.package == 'durable_dashboard' + uses: actions/setup-node@v6 + with: + node-version: "20" + cache: pnpm + cache-dependency-path: durable_dashboard/assets/pnpm-lock.yaml + + - name: Install JS dependencies + if: inputs.package == 'durable_dashboard' + working-directory: durable_dashboard/assets + run: pnpm install --frozen-lockfile + + - name: Publish docs to Hex + env: + HEX_API_KEY: ${{ secrets.HEX_API_KEY }} + run: mix hex.publish docs --yes diff --git a/README.md b/README.md index ab21f6c..c701304 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,10 @@ tag and skips whatever already went out. Release `durable` first when the dashboard needs its changes: the dashboard is published against durable from Hex. +Releases publish their HexDocs too. To fix docs without a release, run +**Actions → Docs**: it republishes a package's docs from `main` under its +current version. + Preview a changelog locally with `git cliff --include-path "durable/**" --tag-pattern "^durable-v" --unreleased`. diff --git a/durable/mix.exs b/durable/mix.exs index 29e4a91..202c675 100644 --- a/durable/mix.exs +++ b/durable/mix.exs @@ -92,7 +92,8 @@ defmodule Durable.MixProject do [ main: "readme", source_url: @source_url, - source_ref: "durable-v#{@version}", + # Each package lives in a subdirectory and has its own tags. + source_url_pattern: "#{@source_url}/blob/durable-v#{@version}/durable/%{path}#L%{line}", extras: [ "README.md", "CHANGELOG.md", diff --git a/durable_dashboard/mix.exs b/durable_dashboard/mix.exs index f5158e1..71298af 100644 --- a/durable_dashboard/mix.exs +++ b/durable_dashboard/mix.exs @@ -113,7 +113,8 @@ defmodule DurableDashboard.MixProject do [ main: "readme", source_url: @source_url, - source_ref: "durable_dashboard-v#{@version}", + # Each package lives in a subdirectory and has its own tags. + source_url_pattern: "#{@source_url}/blob/durable_dashboard-v#{@version}/durable_dashboard/%{path}#L%{line}", extras: ["README.md", "CHANGELOG.md"] ] end From 262c0322fe625948b2242228fa115bbf990a25e3 Mon Sep 17 00:00:00 2001 From: Kasun Vithanage Date: Thu, 22 Oct 2026 10:29:33 +0530 Subject: [PATCH 2/2] style: mix format Claude-Session: https://claude.ai/code/session_012aEMFtJKJsMz1vGtbSijGR --- durable_dashboard/mix.exs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/durable_dashboard/mix.exs b/durable_dashboard/mix.exs index 71298af..525886f 100644 --- a/durable_dashboard/mix.exs +++ b/durable_dashboard/mix.exs @@ -114,7 +114,8 @@ defmodule DurableDashboard.MixProject do main: "readme", source_url: @source_url, # Each package lives in a subdirectory and has its own tags. - source_url_pattern: "#{@source_url}/blob/durable_dashboard-v#{@version}/durable_dashboard/%{path}#L%{line}", + source_url_pattern: + "#{@source_url}/blob/durable_dashboard-v#{@version}/durable_dashboard/%{path}#L%{line}", extras: ["README.md", "CHANGELOG.md"] ] end