From b4d0babfc2338dbd000744159037ab7233b18175 Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Wed, 31 Jul 2024 13:49:58 -0600 Subject: [PATCH] add multisite config to the fixture site this shouldn't need to be done every time, so we check if multisite is true and add the config if it's not true --- .github/workflows/playwright.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 614a6e71..292e4510 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -399,6 +399,18 @@ jobs: echo "Clone the site locally and copy PR updates" terminus local:clone ${{ env.SITE_ID }} cd ~/pantheon-local-copies/"${{ env.SITE_ID }}" + + if ! terminus wp "${{ env.SITE_ID }}".dev -- config is-true MULTISITE; then + echo "Multisite not configured yet..." + echo "Copying multisite application.php" + rm ~/pantheon-local-copies/${{ env.SITE_ID }}/config/application.php + cp "${{ github.workspace }}/.github/fixtures/config/application.subdom.php" ~/pantheon-local-copies/${{ env.SITE_ID }}/config/ + mv ~/pantheon-local-copies/${{ env.SITE_ID }}/config/application.${type}.php" ~/pantheon-local-copies/${{ env.SITE_ID }}/config/application.php + cd ~/pantheon-local-copies/"${{ env.SITE_ID }}" + git add ~/pantheon-local-copies/${{ env.SITE_ID }}/config/application.php + git commit -m "Set up ${type} multisite config" || true + fi + echo "Copying latest changes and committing to the site." rsync -a --exclude='.git' --exclude='status-*.txt' --exclude="node_modules" "${{ github.workspace }}/" . git add -A