From 16f52e8c3eb67f63ef527f24162eb0af7198b420 Mon Sep 17 00:00:00 2001 From: Chris Abraham Date: Wed, 22 May 2024 13:44:40 +0700 Subject: [PATCH] try building the theme in the initial build step so it only has to happen once Signed-off-by: Chris Abraham --- .github/workflows/build_test_and_deploy.yml | 28 ++++++++------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build_test_and_deploy.yml b/.github/workflows/build_test_and_deploy.yml index 7ebffa32..9947363d 100644 --- a/.github/workflows/build_test_and_deploy.yml +++ b/.github/workflows/build_test_and_deploy.yml @@ -83,7 +83,7 @@ jobs: export GITHUB_WORKFLOW_URL=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID ./.github/workflows/set-environment - build_php: + build_site: container: image: quay.io/pantheon-public/build-tools-ci:6.x options: --user root @@ -122,6 +122,14 @@ jobs: - name: run PHP build step run: composer -n build-assets + - uses: actions/setup-node@v4 + with: + node-version: '14.21.3' + + - name: Compile css/js + run: cd ./web/wp-content/themes/lfevents/; npm install; npm run build + + code_sniff_unit_test: runs-on: ubuntu-latest container: @@ -143,7 +151,7 @@ jobs: image: quay.io/pantheon-public/build-tools-ci:6.x options: --user root runs-on: ubuntu-latest - needs: [configure_env_vars, build_php] + needs: [configure_env_vars, build_site] steps: - name: Checkout uses: actions/checkout@v4 @@ -189,13 +197,6 @@ jobs: - name: sync build artifact run: rsync -rz ./web ./vendor . - - uses: actions/setup-node@v4 - with: - node-version: '14.21.3' - - - name: Compile css/js - run: cd ./web/wp-content/themes/lfevents/; npm install; npm run build - # Deploy to Pantheon - name: deploy to Pantheon run: | @@ -211,7 +212,7 @@ jobs: image: quay.io/pantheon-public/build-tools-ci:6.x options: --user root runs-on: ubuntu-latest - needs: [configure_env_vars, build_php] + needs: [configure_env_vars, build_site] steps: - name: Checkout uses: actions/checkout@v4 @@ -257,13 +258,6 @@ jobs: - name: sync build artifact run: rsync -rz ./web ./vendor . - - uses: actions/setup-node@v4 - with: - node-version: '14.21.3' - - - name: Compile css/js - run: cd ./web/wp-content/themes/lfevents/; npm install; npm run build - # Deploy to Pantheon - name: deploy to Pantheon run: |