diff --git a/.github/workflows/build-deploy-production.yml b/.github/workflows/build-deploy-production.yml index e58e8b97a..33b60de27 100644 --- a/.github/workflows/build-deploy-production.yml +++ b/.github/workflows/build-deploy-production.yml @@ -5,35 +5,17 @@ on: branches: - release/* workflow_dispatch: - inputs: - branch_name: - required: false - type: string - description: 'The branch to build from (defaults to calculating what the latest release/* branch is)' concurrency: group: production jobs: - find-latest-branch: - if: ${{ !inputs.branch_name }} - name: Find latest branch - runs-on: ubuntu-latest - outputs: - branch_name: ${{ steps.find_branch.outputs.branch_name }} - steps: - - uses: actions/checkout@v4 - - name: Find latest branch - id: find_branch - run: echo "branch_name=$(git ls-remote --heads origin | grep -oe 'refs/heads/release/.*' | sort -V | tail -n 1 | sed 's|refs/heads/||')" >> $GITHUB_OUTPUT - build: name: Build - needs: find-latest-branch uses: ./.github/workflows/template-build.yml with: - branch_name: ${{ inputs.branch_name || needs.find-latest-branch.outputs.branch_name }} + branch_name: ${{ github.ref }} environment: production secrets: inherit diff --git a/.github/workflows/template-build.yml b/.github/workflows/template-build.yml index 0909e3a3e..c92697c5c 100644 --- a/.github/workflows/template-build.yml +++ b/.github/workflows/template-build.yml @@ -143,9 +143,14 @@ jobs: - name: Install dependencies run: yarn install --immutable + - name: Get number of CPU cores + uses: SimenB/github-actions-cpu-cores@v2 + id: cpu-cores + - name: Build run: yarn build env: + GATSBY_CPU_COUNT: ${{ steps.cpu-cores.outputs.count }} GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES: true - name: Archive artifacts