Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: delete directory from gh-pages on pr close #1637

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/cleanup-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion tests/suites/tenant/queryEditor/queryEditor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
Loading