From 0b99ce33f8718c08453842b0dd995f1e1a1fb611 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste DONNETTE Date: Wed, 30 Oct 2024 08:35:14 +0100 Subject: [PATCH] fix(release-gha): Fixing git commands and using action to checkout correctly --- .github/workflows/release.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index abab7ee..be7aa30 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,10 +11,12 @@ jobs: if: github.event.pull_request.merged == true runs-on: ubuntu-latest steps: - - name: Checkout + - name: Checkout 'gh-pages' branch uses: actions/checkout@v4 with: + ref: gh-pages fetch-depth: 0 + persist-credentials: true - name: Configure Git run: | @@ -46,17 +48,10 @@ jobs: - name: Deploy to GitHub Pages if: env.has_release_label == 'true' run: | - git fetch origin - - git checkout gh-pages - - git pull origin gh-pages --rebase git pull origin main --rebase - helm package . --destination charts/ helm repo index . --url https://getlago.github.io/charts - git add . git commit -m "Update Helm repo index after release" git push origin gh-pages