From 565a7a6f2e885eea6b1ef943dc2506c470e2d096 Mon Sep 17 00:00:00 2001 From: jdaln <150942337+jdaln@users.noreply.github.com> Date: Fri, 5 Dec 2025 20:17:12 +0100 Subject: [PATCH 1/5] fix: js now correctly referred --- .github/workflows/deploy-dev.yml | 1 + .github/workflows/deploy-prod.yml | 1 + index.html | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-dev.yml b/.github/workflows/deploy-dev.yml index fc6efd4..9f0a9c2 100644 --- a/.github/workflows/deploy-dev.yml +++ b/.github/workflows/deploy-dev.yml @@ -3,6 +3,7 @@ name: Deploy Dev Preview on: push: branches: [dev] + workflow_dispatch: permissions: contents: read diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml index 0dd081b..3dff7e9 100644 --- a/.github/workflows/deploy-prod.yml +++ b/.github/workflows/deploy-prod.yml @@ -4,6 +4,7 @@ on: push: tags: - 'v*' + workflow_dispatch: permissions: contents: read diff --git a/index.html b/index.html index 06428a9..ab30f1c 100644 --- a/index.html +++ b/index.html @@ -154,7 +154,7 @@ - + \ No newline at end of file From b08d7394bf1a3143818bbb907da41d472a7285a4 Mon Sep 17 00:00:00 2001 From: jdaln <150942337+jdaln@users.noreply.github.com> Date: Fri, 5 Dec 2025 20:37:50 +0100 Subject: [PATCH 2/5] second js fix --- src/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.js b/src/main.js index 2647751..e1a61e2 100644 --- a/src/main.js +++ b/src/main.js @@ -4,7 +4,7 @@ import { marked } from 'marked' // Fetch and render Federations async function loadFederations() { try { - const response = await fetch('/content/federations.json'); + const response = await fetch('content/federations.json'); const federations = await response.json(); const grid = document.getElementById('federations-grid'); @@ -31,7 +31,7 @@ async function loadFederations() { // Fetch and render Documentation text async function loadDocumentation() { try { - const response = await fetch('/content/documentation.md'); + const response = await fetch('content/documentation.md'); const text = await response.text(); const docContainer = document.getElementById('doc-text'); From fe89d19e33ec1dd5913d54a88aec0b6bf6525e59 Mon Sep 17 00:00:00 2001 From: jdaln <150942337+jdaln@users.noreply.github.com> Date: Fri, 5 Dec 2025 21:21:39 +0100 Subject: [PATCH 3/5] edit to deploy to dev --- .github/workflows/deploy-dev.yml | 41 ++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy-dev.yml b/.github/workflows/deploy-dev.yml index 9f0a9c2..723ed36 100644 --- a/.github/workflows/deploy-dev.yml +++ b/.github/workflows/deploy-dev.yml @@ -42,17 +42,44 @@ jobs: cp public/robots-dev.txt dist/robots.txt - name: Upload artifact - uses: actions/upload-pages-artifact@v3 + uses: actions/upload-artifact@v4 with: + name: github-pages path: dist deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest needs: build steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 + - name: Download artifact + uses: actions/download-artifact@v4 + with: + name: github-pages + path: dist + + - name: Unzip artifact + run: | + cd dist + tar -xf artifact.tar + rm artifact.tar + + - name: Deploy to Preview Repo + env: + PREVIEW_TOKEN: ${{ secrets.PREVIEW_REPO_TOKEN }} + run: | + cd dist + git init + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + + # Configure git credentials securely + git config credential.helper store + echo "https://x-access-token:${PREVIEW_TOKEN}@github.com" > ~/.git-credentials + + git add . + git commit -m "Deploy preview from ${{ github.sha }}" + git remote add origin https://github.com/medical-informatics-platform/mip-website-preview.git + git push -f origin main:gh-pages + + # Clean up credentials + rm ~/.git-credentials From dc9f5de9518bbc10cc55a1594daa929404d1261c Mon Sep 17 00:00:00 2001 From: jdaln <150942337+jdaln@users.noreply.github.com> Date: Fri, 5 Dec 2025 21:24:01 +0100 Subject: [PATCH 4/5] fix --- .github/workflows/deploy-dev.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/deploy-dev.yml b/.github/workflows/deploy-dev.yml index 723ed36..ad54a4d 100644 --- a/.github/workflows/deploy-dev.yml +++ b/.github/workflows/deploy-dev.yml @@ -57,12 +57,6 @@ jobs: name: github-pages path: dist - - name: Unzip artifact - run: | - cd dist - tar -xf artifact.tar - rm artifact.tar - - name: Deploy to Preview Repo env: PREVIEW_TOKEN: ${{ secrets.PREVIEW_REPO_TOKEN }} From ef9a931f57514a8417c1307110cdb31293dce3b7 Mon Sep 17 00:00:00 2001 From: jdaln <150942337+jdaln@users.noreply.github.com> Date: Fri, 5 Dec 2025 21:28:20 +0100 Subject: [PATCH 5/5] fix --- .github/workflows/deploy-dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-dev.yml b/.github/workflows/deploy-dev.yml index ad54a4d..8325987 100644 --- a/.github/workflows/deploy-dev.yml +++ b/.github/workflows/deploy-dev.yml @@ -73,7 +73,7 @@ jobs: git add . git commit -m "Deploy preview from ${{ github.sha }}" git remote add origin https://github.com/medical-informatics-platform/mip-website-preview.git - git push -f origin main:gh-pages + git push -f origin HEAD:gh-pages # Clean up credentials rm ~/.git-credentials