-
Notifications
You must be signed in to change notification settings - Fork 800
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created a separate job to avoid re-building on a re-run, h/t @anomiex.
- Loading branch information
Showing
1 changed file
with
14 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 [email protected]:~/htdocs/wp-content/mu-plugins | ||
scp -r projects/plugins/wpcomsh/bin [email protected]:/srv/htdocs/wp-content/mu-plugins/wpcomsh | ||
|