From 724146035e5f4cfe244c156504ab95921d50ac8c Mon Sep 17 00:00:00 2001 From: Valerij Fredriksen Date: Wed, 16 Oct 2024 10:35:30 +0200 Subject: [PATCH 1/2] Fix branch name --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index a9f2be7..261c775 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -29,7 +29,7 @@ jobs: - name: Store build artifact uses: actions/upload-artifact@v4 - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' with: name: build path: dist/ From 04fd9248e05d1e7ba622e4dd1fd6b00d1ee91345 Mon Sep 17 00:00:00 2001 From: Valerij Fredriksen Date: Wed, 16 Oct 2024 10:40:35 +0200 Subject: [PATCH 2/2] Do not hardcode branch --- .github/workflows/deploy.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 261c775..5d52cc0 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -29,13 +29,13 @@ jobs: - name: Store build artifact uses: actions/upload-artifact@v4 - if: github.ref == 'refs/heads/main' + if: github.ref_name == github.event.repository.default_branch with: name: build path: dist/ deploy: - if: github.ref == 'refs/heads/main' + if: github.ref_name == github.event.repository.default_branch runs-on: ubuntu-latest