From d964e23f998523c58f465295cb4e355ccf25f514 Mon Sep 17 00:00:00 2001 From: G-Fourteen Date: Sat, 1 Nov 2025 11:36:10 -0600 Subject: [PATCH] Adjust AI URL handling and remove main branch workflow --- .github/workflows/main-branch.yml | 88 ------------------------------- AI/index.html | 2 +- landing.js | 6 ++- 3 files changed, 5 insertions(+), 91 deletions(-) delete mode 100644 .github/workflows/main-branch.yml diff --git a/.github/workflows/main-branch.yml b/.github/workflows/main-branch.yml deleted file mode 100644 index 8ce9f36..0000000 --- a/.github/workflows/main-branch.yml +++ /dev/null @@ -1,88 +0,0 @@ -name: Main Branch Pipeline - -on: - push: - branches: - - main - workflow_dispatch: - -jobs: - build: - name: Build and Upload Artifacts - runs-on: ubuntu-latest - steps: - - name: Check out repository - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.11" - - name: Configure GitHub Pages - uses: actions/configure-pages@v5 - - name: Prepare static site bundle - run: python build.py --output dist - - name: Upload build artifacts - uses: actions/upload-artifact@v4 - with: - name: static-site - path: dist - - name: Upload Pages artifact - uses: actions/upload-pages-artifact@v3 - with: - path: dist - - report-build: - name: Report Build Status - needs: build - if: always() - runs-on: ubuntu-latest - steps: - - name: Report Build Status - run: | - echo "Main branch build finished with status: ${{ needs.build.result }}" - - tests: - name: Run Tests - runs-on: ubuntu-latest - steps: - - name: Check out repository - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.11" - - name: Build static site bundle - run: python build.py --output dist - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - - name: Run Tests - run: pytest - - deploy: - name: Deploy to Pages - needs: - - build - - tests - runs-on: ubuntu-latest - permissions: - pages: write - id-token: write - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - steps: - - name: Deploy to Pages - id: deployment - uses: actions/deploy-pages@v4 - - report-tests: - name: Report Tests Statuses - needs: tests - if: always() - runs-on: ubuntu-latest - steps: - - name: Report Tests Statuses - run: | - echo "Main branch tests completed with status: ${{ needs.tests.result }}" diff --git a/AI/index.html b/AI/index.html index da94636..f2ebbe1 100644 --- a/AI/index.html +++ b/AI/index.html @@ -21,7 +21,7 @@ ); if (!hasCookie && !isFileProtocol) { - const fallbackUrl = new URL('../index.html', window.location.href); + const fallbackUrl = new URL('../', window.location.href); window.location.replace(fallbackUrl.toString()); } } catch (error) { diff --git a/landing.js b/landing.js index 573438a..8eb7a6e 100644 --- a/landing.js +++ b/landing.js @@ -135,8 +135,10 @@ document.addEventListener('DOMContentLoaded', () => { document.cookie = "checks-passed=true;path=/"; // Redirect to the AI page relative to the current location so the // experience keeps working when the site is hosted from a - // subdirectory (such as GitHub Pages). - const launchUrl = new URL('./AI/index.html', window.location.href); + // subdirectory (such as GitHub Pages). We point at the directory + // itself so browsers don't expose the underlying index.html file + // in the address bar. + const launchUrl = new URL('./AI/', window.location.href); window.location.assign(launchUrl.toString()); } });