Skip to content

Commit a645729

Browse files
authored
release: v1.0.0-rc1 (#1)
1 parent cc8f712 commit a645729

File tree

4 files changed

+33
-10
lines changed

4 files changed

+33
-10
lines changed

.github/workflows/deploy-dev.yml

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Deploy Dev Preview
33
on:
44
push:
55
branches: [dev]
6+
workflow_dispatch:
67

78
permissions:
89
contents: read
@@ -41,17 +42,38 @@ jobs:
4142
cp public/robots-dev.txt dist/robots.txt
4243
4344
- name: Upload artifact
44-
uses: actions/upload-pages-artifact@v3
45+
uses: actions/upload-artifact@v4
4546
with:
47+
name: github-pages
4648
path: dist
4749

4850
deploy:
49-
environment:
50-
name: github-pages
51-
url: ${{ steps.deployment.outputs.page_url }}
5251
runs-on: ubuntu-latest
5352
needs: build
5453
steps:
55-
- name: Deploy to GitHub Pages
56-
id: deployment
57-
uses: actions/deploy-pages@v4
54+
- name: Download artifact
55+
uses: actions/download-artifact@v4
56+
with:
57+
name: github-pages
58+
path: dist
59+
60+
- name: Deploy to Preview Repo
61+
env:
62+
PREVIEW_TOKEN: ${{ secrets.PREVIEW_REPO_TOKEN }}
63+
run: |
64+
cd dist
65+
git init
66+
git config user.name "github-actions[bot]"
67+
git config user.email "github-actions[bot]@users.noreply.github.com"
68+
69+
# Configure git credentials securely
70+
git config credential.helper store
71+
echo "https://x-access-token:${PREVIEW_TOKEN}@github.com" > ~/.git-credentials
72+
73+
git add .
74+
git commit -m "Deploy preview from ${{ github.sha }}"
75+
git remote add origin https://github.com/medical-informatics-platform/mip-website-preview.git
76+
git push -f origin HEAD:gh-pages
77+
78+
# Clean up credentials
79+
rm ~/.git-credentials

.github/workflows/deploy-prod.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
tags:
66
- 'v*'
7+
workflow_dispatch:
78

89
permissions:
910
contents: read

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154
</div>
155155
</footer>
156156
</div>
157-
<script type="module" src="/src/main.js"></script>
157+
<script type="module" src="src/main.js"></script>
158158
</body>
159159

160160
</html>

src/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { marked } from 'marked'
44
// Fetch and render Federations
55
async function loadFederations() {
66
try {
7-
const response = await fetch('/content/federations.json');
7+
const response = await fetch('content/federations.json');
88
const federations = await response.json();
99
const grid = document.getElementById('federations-grid');
1010

@@ -31,7 +31,7 @@ async function loadFederations() {
3131
// Fetch and render Documentation text
3232
async function loadDocumentation() {
3333
try {
34-
const response = await fetch('/content/documentation.md');
34+
const response = await fetch('content/documentation.md');
3535
const text = await response.text();
3636
const docContainer = document.getElementById('doc-text');
3737

0 commit comments

Comments
 (0)