From 5398215cd5aad41964d73548ab8d3aabf5e88bb5 Mon Sep 17 00:00:00 2001 From: Brandon Ly Date: Tue, 10 Sep 2024 11:03:11 -0500 Subject: [PATCH 1/9] Update netlify.toml --- netlify.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/netlify.toml b/netlify.toml index 2d0a3b98..cdc4fdc0 100644 --- a/netlify.toml +++ b/netlify.toml @@ -5,5 +5,6 @@ name = "snooty-cache-plugin" # set in your site’s Branches settings in the UI will inherit # these settings. [build] -publish = "snooty/public" -command = ". ./build.sh" +base = "source" +publish = "../snooty/public" +command = "cd ../ && . ./build.sh" From 7aa6860d2b116f6dc9cc78f79fef269167e8bb2f Mon Sep 17 00:00:00 2001 From: Brandon Ly Date: Tue, 10 Sep 2024 11:06:58 -0500 Subject: [PATCH 2/9] Update build.sh --- build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index b62b6772..d336352b 100644 --- a/build.sh +++ b/build.sh @@ -3,6 +3,7 @@ if [ -f build-site.sh ]; then rm build-site.sh fi +pwd curl https://raw.githubusercontent.com/mongodb/docs-worker-pool/netlify-poc/scripts/build-site.sh -o build-site.sh -sh build-site.sh \ No newline at end of file +sh build-site.sh From 86546a670919d1be32db8213961116a7bbf70ae1 Mon Sep 17 00:00:00 2001 From: branberry Date: Tue, 10 Sep 2024 11:27:11 -0500 Subject: [PATCH 3/9] Create composer directory --- .github/actions/setup/action.yml | 2 ++ composer.json | 18 ------------------ 2 files changed, 2 insertions(+), 18 deletions(-) delete mode 100644 composer.json diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 61d350f3..c12259ee 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -46,7 +46,9 @@ runs: - name: Install dependencies with Composer uses: ramsey/composer-install@3.0.0 with: + working-directory: "composer" # Revert when psalm supports PHP 8.4 # composer-options: "--no-suggest" composer-options: "--no-suggest ${{ inputs.php-version == '8.4' && '--ignore-platform-req=php+' || '' }}" + \ No newline at end of file diff --git a/composer.json b/composer.json deleted file mode 100644 index 3efdceab..00000000 --- a/composer.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "mongodb/docs-php-library", - "description": "MongoDB PHP Library Documentation", - "require": { - "ext-mongodb": "^1.19", - "mongodb/mongodb": "^1.19" - }, - "require-dev": { - "doctrine/coding-standard": "^12.0", - "squizlabs/php_codesniffer": "^3.7", - "vimeo/psalm": "^5.13" - }, - "config": { - "allow-plugins": { - "dealerdirect/phpcodesniffer-composer-installer": true - } - } -} From 65ecef2f731dedba9d4a4cb85ac48eda43877b98 Mon Sep 17 00:00:00 2001 From: branberry Date: Tue, 10 Sep 2024 11:29:46 -0500 Subject: [PATCH 4/9] Revert netlify.toml --- netlify.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/netlify.toml b/netlify.toml index cdc4fdc0..d9fb7a2c 100644 --- a/netlify.toml +++ b/netlify.toml @@ -5,6 +5,6 @@ name = "snooty-cache-plugin" # set in your site’s Branches settings in the UI will inherit # these settings. [build] -base = "source" -publish = "../snooty/public" -command = "cd ../ && . ./build.sh" + +publish = "snooty/public" +command = ". ./build.sh" From 2bd24a5a8a2aa9f2292c58dd0182c5b0fa787c54 Mon Sep 17 00:00:00 2001 From: branberry Date: Tue, 10 Sep 2024 11:30:00 -0500 Subject: [PATCH 5/9] Add composer directory --- composer/composer.json | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 composer/composer.json diff --git a/composer/composer.json b/composer/composer.json new file mode 100644 index 00000000..3efdceab --- /dev/null +++ b/composer/composer.json @@ -0,0 +1,18 @@ +{ + "name": "mongodb/docs-php-library", + "description": "MongoDB PHP Library Documentation", + "require": { + "ext-mongodb": "^1.19", + "mongodb/mongodb": "^1.19" + }, + "require-dev": { + "doctrine/coding-standard": "^12.0", + "squizlabs/php_codesniffer": "^3.7", + "vimeo/psalm": "^5.13" + }, + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } + } +} From 26b4e07789ac0a8ad555b43da5375c85662ac03f Mon Sep 17 00:00:00 2001 From: branberry Date: Tue, 10 Sep 2024 11:32:05 -0500 Subject: [PATCH 6/9] Force static analysis --- .github/workflows/static-analysis.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index ef58d7c5..bf7a7d40 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -2,9 +2,11 @@ name: "Static Analysis" on: pull_request: - paths: - - "source/**/*.php" - - ".github/workflows/*.yml" + branches: master + # paths: + + # - "source/**/*.php" + # - ".github/workflows/*.yml" workflow_call: inputs: ref: From 24988d5b110816109d65ccd0ed54419a4fd4b856 Mon Sep 17 00:00:00 2001 From: branberry Date: Tue, 10 Sep 2024 11:36:25 -0500 Subject: [PATCH 7/9] Move vendor --- .github/actions/setup/action.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index c12259ee..81efa8e1 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -51,4 +51,6 @@ runs: # composer-options: "--no-suggest" composer-options: "--no-suggest ${{ inputs.php-version == '8.4' && '--ignore-platform-req=php+' || '' }}" - \ No newline at end of file + - name: Move vendor up a level + run: "mv composer/vendor ." + shell: bash \ No newline at end of file From 5ab08a7968f53dbe7b533272f75f5e0c127a56b2 Mon Sep 17 00:00:00 2001 From: branberry Date: Tue, 10 Sep 2024 11:42:25 -0500 Subject: [PATCH 8/9] Undo pwd --- build.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/build.sh b/build.sh index d336352b..a5e15032 100644 --- a/build.sh +++ b/build.sh @@ -3,7 +3,5 @@ if [ -f build-site.sh ]; then rm build-site.sh fi -pwd - curl https://raw.githubusercontent.com/mongodb/docs-worker-pool/netlify-poc/scripts/build-site.sh -o build-site.sh sh build-site.sh From 21d2d0d629bc520c6e17b81178adaac0ce5da148 Mon Sep 17 00:00:00 2001 From: branberry Date: Tue, 10 Sep 2024 12:13:26 -0500 Subject: [PATCH 9/9] revert test changes --- .github/workflows/static-analysis.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index bf7a7d40..ef58d7c5 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -2,11 +2,9 @@ name: "Static Analysis" on: pull_request: - branches: master - # paths: - - # - "source/**/*.php" - # - ".github/workflows/*.yml" + paths: + - "source/**/*.php" + - ".github/workflows/*.yml" workflow_call: inputs: ref: