diff --git a/.github/workflows/wpcloud.yml b/.github/workflows/wpcloud.yml index c05e6fcaf5de4..cae020a02c8bc 100644 --- a/.github/workflows/wpcloud.yml +++ b/.github/workflows/wpcloud.yml @@ -9,8 +9,8 @@ concurrency: cancel-in-progress: true jobs: - deploy: - name: Run phpunit on WPCloud site + build: + name: Install the Monorepo and build wpcomsh runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -44,9 +44,20 @@ jobs: # WPCOMSH_CHANGED="$(jq --argjson changed "$CHANGED" -n '$changed | has( "plugins/wpcomsh" ) ')" WPCOMSH_CHANGED="true" echo "wpcomsh=${WPCOMSH_CHANGED}" >> "$GITHUB_OUTPUT" + - name: Build wpcomsh + if: steps.changed.outputs.wpcomsh == 'true' + run: | + echo "::group::Installing and building wpcomsh" + pnpm jetpack build -v --deps plugins/wpcomsh + echo "::endgroup::" + deploy: + name: Run PHPUnit on the WPCloud test site + runs-on: ubuntu-latest + needs: build + steps: - name: Configure Github to be able to SSH to the Atomic site - if: steps.changed.outputs.wpcomsh == 'true' + if: needs.build.changed.outputs.wpcomsh == 'true' run: | echo "::group::Intializing" @@ -64,10 +75,6 @@ jobs: echo "::endgroup::" - echo "::group::Installing and building wpcomsh" - pnpm jetpack build plugins/wpcomsh - echo "::endgroup::" - echo "::group::Transferring wpcomsh to the testing server" pnpm jetpack rsync wpcomsh jetpackwpcomshtester.wordpress.com@sftp.wp.com:~/htdocs/wp-content/mu-plugins scp -r projects/plugins/wpcomsh/bin jetpackwpcomshtester.wordpress.com@sftp.wp.com:/srv/htdocs/wp-content/mu-plugins/wpcomsh