Skip to content

Commit

Permalink
Created a separate job to avoid re-building on a re-run, h/t @anomiex.
Browse files Browse the repository at this point in the history
  • Loading branch information
zinigor committed Oct 25, 2024
1 parent df0ed81 commit 3618211
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/wpcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand All @@ -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
Expand Down

0 comments on commit 3618211

Please sign in to comment.