From 2078d956003920ebedf2e5adabba45bfb1c19aac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Feb 2023 16:14:44 +0100 Subject: [PATCH 01/25] chore(deps): bump peaceiris/actions-gh-pages from 3.9.0 to 3.9.2 (#61) Bumps [peaceiris/actions-gh-pages](https://github.com/peaceiris/actions-gh-pages) from 3.9.0 to 3.9.2. - [Release notes](https://github.com/peaceiris/actions-gh-pages/releases) - [Changelog](https://github.com/peaceiris/actions-gh-pages/blob/main/CHANGELOG.md) - [Commits](https://github.com/peaceiris/actions-gh-pages/compare/v3.9.0...v3.9.2) --- updated-dependencies: - dependency-name: peaceiris/actions-gh-pages dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bba7684..8d3d53a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: - name: Deploy to GitHub Pages if: github.event_name == 'push' - uses: peaceiris/actions-gh-pages@v3.9.0 + uses: peaceiris/actions-gh-pages@v3.9.2 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./public From f2cc09bbdd0b46b40047eeeb19b7a223882e0dde Mon Sep 17 00:00:00 2001 From: Jan Raasch <425211+janraasch@users.noreply.github.com> Date: Wed, 8 Mar 2023 18:36:16 +0100 Subject: [PATCH 02/25] chore(ci): split build into build and deploy jobs --- .github/workflows/ci.yml | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d3d53a..b3baa9c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,8 @@ on: jobs: build: - runs-on: ubuntu-18.04 + name: Build + runs-on: ubuntu-latest steps: - name: Checkout @@ -23,10 +24,25 @@ jobs: - name: Build local ./exampleSite run: hugo --minify --gc --destination ../public --source ./exampleSite --themesDir ../.. --baseURL https://janraasch.github.io/hugo-bearblog/ - - - name: Deploy to GitHub Pages - if: github.event_name == 'push' - uses: peaceiris/actions-gh-pages@v3.9.2 + + - name: Upload Artifact + uses: actions/upload-artifact@v3 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./public + name: build + path: ./public + + deploy: + needs: build + name: Deploy to GitHub Pages + runs-on: ubuntu-latest + if: ${{ github.ref == 'refs/heads/source' }} + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@v3 + with: + name: build + path: ./public + - uses: peaceiris/actions-gh-pages@v3.9.2 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./public From bbb374cb157b062ac43c2591095135bc47e7d5f2 Mon Sep 17 00:00:00 2001 From: Jan Raasch <425211+janraasch@users.noreply.github.com> Date: Wed, 8 Mar 2023 18:44:15 +0100 Subject: [PATCH 03/25] chore(ci): fix deploy condition - hopefully --- .github/workflows/ci.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b3baa9c..b441fd9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,14 +35,10 @@ jobs: needs: build name: Deploy to GitHub Pages runs-on: ubuntu-latest - if: ${{ github.ref == 'refs/heads/source' }} + if: github.ref == 'refs/heads/source' steps: - uses: actions/checkout@v3 - uses: actions/download-artifact@v3 with: name: build path: ./public - - uses: peaceiris/actions-gh-pages@v3.9.2 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./public From 7620f8d1f7253115713a4e3032e053ba1fa84fd8 Mon Sep 17 00:00:00 2001 From: Jan Raasch <425211+janraasch@users.noreply.github.com> Date: Wed, 8 Mar 2023 18:45:36 +0100 Subject: [PATCH 04/25] chore(ci): fix deploy condition - for real! :) --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b441fd9..ed434f6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: needs: build name: Deploy to GitHub Pages runs-on: ubuntu-latest - if: github.ref == 'refs/heads/source' + if: github.event_name == 'push' steps: - uses: actions/checkout@v3 - uses: actions/download-artifact@v3 From 63484fa54a06f0f0ee44eb13d96274409935633b Mon Sep 17 00:00:00 2001 From: Jan Raasch <425211+janraasch@users.noreply.github.com> Date: Wed, 8 Mar 2023 19:03:20 +0100 Subject: [PATCH 05/25] chore(ci): auto-merge patch and minor updates of deps --- .github/workflows/ci.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ed434f6..8f203bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,6 +30,24 @@ jobs: with: name: build path: ./public + + dependabot: + name: Dependabot Auto-Merge + needs: build + runs-on: ubuntu-latest + if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}} + steps: + - name: Dependabot metadata + id: dependabot-metadata + uses: dependabot/fetch-metadata@v1 + with: + github-token: '${{ secrets.GITHUB_TOKEN }}' + - name: Enable auto-merge for Dependabot PRs + if: contains(fromJSON('["version-update:semver-patch", "version-update:semver-minor"]'), steps.dependabot-metadata.outputs.update-type) + run: gh pr merge --auto --merge "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} deploy: needs: build From 5fb7b332564c19f95e93cf675a9fd1e4a66a9fbd Mon Sep 17 00:00:00 2001 From: Jan Raasch <425211+janraasch@users.noreply.github.com> Date: Wed, 15 Mar 2023 13:01:49 +0100 Subject: [PATCH 06/25] fix: remove trailing slashes Guess what, on https://gohugo.io/functions/relurl/ it says > As a best practice, never include a leading slash when using this function. Fixes https://github.com/janraasch/hugo-bearblog/issues/65 --- layouts/_default/list.html | 2 +- layouts/partials/header.html | 2 +- layouts/partials/nav.html | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 8b8c14b..90cbee5 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -3,7 +3,7 @@ {{ if .Data.Singular }}

Filtering for "{{ .Title }}"

- Remove filter + Remove filter {{ end }}