From bf23f032d711832f02b049ff1772c101a3686c31 Mon Sep 17 00:00:00 2001 From: Robbert Broersma Date: Wed, 1 Nov 2023 07:41:26 +0100 Subject: [PATCH] ci: explicitly configure main branch in env variable --- .github/workflows/continuous-delivery.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/continuous-delivery.yml b/.github/workflows/continuous-delivery.yml index 5b53d985629..a24c22191de 100644 --- a/.github/workflows/continuous-delivery.yml +++ b/.github/workflows/continuous-delivery.yml @@ -8,6 +8,7 @@ on: env: CI: true + MAIN_BRANCH: "main" jobs: install: @@ -251,14 +252,14 @@ jobs: uses: chromaui/action@v1 if: github.event.pull_request.draft == false with: - autoAcceptChanges: main + autoAcceptChanges: ${{ env.MAIN_BRANCH }} projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} storybookBuildDir: packages/storybook-css/dist/ publish-website: runs-on: ubuntu-latest needs: build - if: github.ref == 'refs/heads/main' + if: github.ref == "refs/heads/main" steps: - name: Checkout release branch @@ -279,7 +280,7 @@ jobs: - name: Continuous Deployment to designsystem.utrecht.nl uses: JamesIves/github-pages-deploy-action@v4.4.3 with: - branch: main + branch: $${ env.MAIN_BRANCH }} folder: packages/design-system-website/dist/ repository-name: nl-design-system/designsystem.utrecht.nl token: ${{ secrets.DOCS_GH_TOKEN }} @@ -287,7 +288,7 @@ jobs: publish-npm: runs-on: ubuntu-latest needs: [lint, test] - if: github.ref == 'refs/heads/main' + if: github.ref == "refs/heads/main" env: NODE_OPTIONS: "--max-old-space-size=6114" @@ -356,7 +357,7 @@ jobs: GIT_COMMITTER_EMAIL: ${{ secrets.GIT_COMMITTER_EMAIL }} GIT_COMMITTER_NAME: "NL Design System" run: | - git push --set-upstream origin HEAD + git push --set-upstream "origin/${MAIN_BRANCH}" HEAD pnpm run release - name: "Continuous Deployment: publish to npm"