@wp-operations/wp-ops 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/templates.js +6 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wp-operations/wp-ops",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "The wp-operations tool. One install gives the platform and wp-ops, wp-app, wp-ide and wp-code.",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/templates.js CHANGED
@@ -228,19 +228,21 @@ ${SSH_SETUP}
228
228
  env:
229
229
  SERVERS: \${{ secrets.SERVERS }}
230
230
  run: |
231
- SERVER_LABEL=$(jq -r '.platform.server' .github/platform.json)
232
- APP_PATH=$(jq -r '.platform.app_path' .github/platform.json)
231
+ SERVER_LABEL=$(jq -r '.platform.server // ""' .github/platform.json)
232
+ APP_PATH=$(jq -r '.platform.app_path // ""' .github/platform.json)
233
233
  THEME_SLUG=$(jq -r '.platform.theme_slug // "wp-operations"' .github/platform.json)
234
- if [ -z "$SERVER_LABEL" ] || [ -z "$APP_PATH" ]; then echo "Set platform.server and platform.app_path in .github/platform.json."; exit 1; fi
234
+ if [ -z "$SERVER_LABEL" ] || [ -z "$APP_PATH" ]; then echo "::notice::Set platform.server and platform.app_path in .github/platform.json to deploy the platform."; echo "skip=true" >> "$GITHUB_OUTPUT"; exit 0; fi
235
235
  ${SERVER_LOOKUP}
236
236
  echo "target=$SSH_USER@$SERVER_IP" >> "$GITHUB_OUTPUT"
237
237
  echo "app_path=$APP_PATH" >> "$GITHUB_OUTPUT"
238
238
  echo "theme_slug=$THEME_SLUG" >> "$GITHUB_OUTPUT"
239
239
 
240
240
  - name: Use this repository's platform.json
241
+ if: steps.target.outputs.skip != 'true'
241
242
  run: cp platform.json wp-operations/platform.json
242
243
 
243
244
  - name: Deploy via rsync
245
+ if: steps.target.outputs.skip != 'true'
244
246
  uses: nick-fields/retry@v3
245
247
  with:
246
248
  timeout_minutes: 5
@@ -253,6 +255,7 @@ ${SERVER_LOOKUP}
253
255
  \${{ steps.target.outputs.target }}:\${{ steps.target.outputs.app_path }}/wp-content/themes/\${{ steps.target.outputs.theme_slug }}/
254
256
 
255
257
  - name: Activate the platform and flush cache
258
+ if: steps.target.outputs.skip != 'true'
256
259
  uses: nick-fields/retry@v3
257
260
  with:
258
261
  timeout_minutes: 5