From a7c64f72df5a219bc9fb99ff7739d7206ba84aa2 Mon Sep 17 00:00:00 2001 From: Anton Standrik Date: Fri, 15 Nov 2024 17:32:20 +0300 Subject: [PATCH 1/3] fix: delete directory from gh-pages on pr close --- tests/suites/tenant/queryEditor/queryEditor.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/suites/tenant/queryEditor/queryEditor.test.ts b/tests/suites/tenant/queryEditor/queryEditor.test.ts index e9cd270d4e..96cb8db246 100644 --- a/tests/suites/tenant/queryEditor/queryEditor.test.ts +++ b/tests/suites/tenant/queryEditor/queryEditor.test.ts @@ -27,7 +27,7 @@ test.describe('Test Query Editor', async () => { await tenantPage.goto(pageQueryParams); }); - test('Settings dialog opens on Gear click and closes on Cancel', async ({page}) => { + test.only('Settings dialog opens on Gear click and closes on Cancel', async ({page}) => { const queryEditor = new QueryEditor(page); await queryEditor.clickGearButton(); From 7e9192d809e6f2019322641fe4d93aaba782c58c Mon Sep 17 00:00:00 2001 From: Anton Standrik Date: Fri, 15 Nov 2024 17:32:20 +0300 Subject: [PATCH 2/3] fix: delete directory from gh-pages on pr close --- .github/workflows/cleanup-gh-pages.yml | 35 ++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/cleanup-gh-pages.yml diff --git a/.github/workflows/cleanup-gh-pages.yml b/.github/workflows/cleanup-gh-pages.yml new file mode 100644 index 0000000000..2149139d8d --- /dev/null +++ b/.github/workflows/cleanup-gh-pages.yml @@ -0,0 +1,35 @@ +name: Cleanup GitHub Pages on PR Close + +on: + pull_request: + types: + - closed + +jobs: + cleanup: + runs-on: ubuntu-latest + permissions: + contents: write + pages: write + pull-requests: write + + steps: + - uses: actions/checkout@v4 + + - name: Fetch gh-pages branch + run: | + git fetch origin gh-pages:gh-pages + mkdir gh-pages + git --work-tree=gh-pages checkout gh-pages -- . + + - name: Remove PR directory + run: | + rm -rf gh-pages/${{ github.event.pull_request.number }} + + - name: Deploy report to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: gh-pages + destination_dir: . + force_orphan: true From 2f51c4324ec4bdd3b272bb8f84342e3f1cfa6a1e Mon Sep 17 00:00:00 2001 From: Anton Standrik Date: Fri, 15 Nov 2024 17:54:52 +0300 Subject: [PATCH 3/3] fix: tests --- tests/suites/tenant/queryEditor/queryEditor.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/suites/tenant/queryEditor/queryEditor.test.ts b/tests/suites/tenant/queryEditor/queryEditor.test.ts index 96cb8db246..e9cd270d4e 100644 --- a/tests/suites/tenant/queryEditor/queryEditor.test.ts +++ b/tests/suites/tenant/queryEditor/queryEditor.test.ts @@ -27,7 +27,7 @@ test.describe('Test Query Editor', async () => { await tenantPage.goto(pageQueryParams); }); - test.only('Settings dialog opens on Gear click and closes on Cancel', async ({page}) => { + test('Settings dialog opens on Gear click and closes on Cancel', async ({page}) => { const queryEditor = new QueryEditor(page); await queryEditor.clickGearButton();