diff --git a/.github/workflows/hugo.yaml b/.github/workflows/hugo.yaml index 78c3eaa..67d7433 100644 --- a/.github/workflows/hugo.yaml +++ b/.github/workflows/hugo.yaml @@ -4,8 +4,9 @@ name: Deploy Hugo site to Pages on: # Runs on pushes targeting the default branch push: - branches: - - main + # branches: + # - main + branches: [ "*" ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -60,7 +61,7 @@ jobs: hugo \ --gc \ --minify \ - --baseURL "${{ steps.pages.outputs.base_url }}/" + --baseURL "${{ steps.pages.outputs.base_url }}/" - name: Upload artifact uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1 with: diff --git a/layouts/partials/capsule/chart-version.html b/layouts/partials/capsule/chart-version.html index 2c4b9db..09c9e2e 100644 --- a/layouts/partials/capsule/chart-version.html +++ b/layouts/partials/capsule/chart-version.html @@ -13,13 +13,13 @@ {{- $scratch.Set "chartVersion" "" -}} {{- $helmIndexURL := "https://projectcapsule.github.io/charts/index.yaml" -}} -{{- $remote := resources.GetRemote $helmIndexURL -}} - -{{- if $remote.Err -}} - {{- /* Remote fetch failed; we can't do better than a placeholder. */ -}} - {{- "latest" -}} -{{- else -}} - {{- $data := $remote | transform.Unmarshal -}} +{{- with try (resources.GetRemote $helmIndexURL) -}} + {{- with .Err -}} + {{- /* Remote fetch failed; we can't do better than a placeholder. */ -}} + {{- "latest" -}} + {{- else -}} + {{- $remote := .Value -}} + {{- $data := $remote | transform.Unmarshal -}} {{- $entries := index $data "entries" -}} {{- $capsuleCharts := index $entries "capsule" -}} @@ -50,6 +50,6 @@ {{- end -}} {{- end -}} {{- end -}} - {{- $scratch.Get "chartVersion" -}} + {{- end -}} {{- end -}}