Skip to content
Open
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
46 changes: 21 additions & 25 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
name: Publish GitHub Pages site
name: Deploy GitHub Pages site

on:
push:
branches: [main]
workflow_dispatch:

permissions:
contents: write
contents: read
pages: write
id-token: write

concurrency:
group: github-pages-source
group: github-pages
cancel-in-progress: true

jobs:
publish:
name: Verify and publish static site
deploy:
if: github.ref == 'refs/heads/main'
name: Verify and deploy static site
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest

steps:
Expand All @@ -27,30 +33,20 @@ jobs:
node-version: 22
cache: npm

- name: Configure Pages
uses: actions/configure-pages@v6

- name: Install dependencies
run: npm ci --include=optional

- name: Verify application
run: npm run verify

- name: Build GitHub Pages site
run: npm run build:pages

- name: Upload generated site artifact
uses: actions/upload-artifact@v6
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v5
with:
name: math-biotech-pages-site
path: site
if-no-files-found: error

- name: Commit generated site to main
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -A site
if git diff --cached --quiet; then
echo "Generated site is already current."
else
git commit -m "chore: publish GitHub Pages site [skip ci]"
git push origin HEAD:main
fi
path: dist

- name: Deploy GitHub Pages
id: deployment
uses: actions/deploy-pages@v5
5 changes: 3 additions & 2 deletions .pages-release
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Math Biotech GitHub Pages release
Deployed: 2026-08-06T00:18:30+02:00
Site path: /Math-Biotech-Project/site/
Deployment: GitHub Actions
Site path: /Math-Biotech-Project/
Legacy redirect: /Math-Biotech-Project/site/
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"dev": "vite",
"build": "vite build",
"build:pages": "vite build --base=/Math-Biotech-Project/site/ --outDir site --emptyOutDir",
"build:pages": "vite build",
"preview": "vite preview",
"typecheck": "tsc --noEmit",
"test": "vitest run",
Expand Down
18 changes: 18 additions & 0 deletions public/site/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="refresh" content="0; url=../" />
<title>Redirecting…</title>
<script>
const target = new URL('../', window.location.href);
target.search = window.location.search;
target.hash = window.location.hash;
window.location.replace(target.toString());
</script>
</head>
<body>
<p><a href="../">Continue to Math Biotech</a></p>
</body>
</html>