Skip to content

Commit 20b17ea

Browse files
committed
Merge branch 'main' into scenarioUpdwate
2 parents 485b8b0 + c19d86f commit 20b17ea

File tree

11 files changed

+52
-100
lines changed

11 files changed

+52
-100
lines changed

.github/workflows/pages.yaml

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,44 +7,54 @@ on:
77
pull_request:
88
branches:
99
- main
10+
types:
11+
- opened
12+
- reopened
13+
- synchronize
14+
- closed
1015
workflow_dispatch:
1116

1217
permissions:
13-
contents: read
18+
contents: write # to write the built page to the branch
19+
pull-requests: write # to leave a comment with the preview URL
1420

1521
concurrency:
16-
group: pages
22+
# set separate concurrency groups for main and PR branches
23+
group: ${{ github.event_name == 'pull_request' && format('pages-preview-{0}', github.event.pull_request.number) || 'pages-main' }}
1724
cancel-in-progress: false
1825

1926
jobs:
27+
2028
build:
2129
runs-on: ubuntu-latest
2230
steps:
23-
- uses: actions/checkout@v5
31+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
2432
with:
2533
fetch-depth: 0
26-
- uses: actions/setup-node@v4
34+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
2735
with:
2836
node-version: 22
2937
cache: npm
30-
- uses: actions/configure-pages@v4
38+
39+
- id: configure
40+
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
41+
3142
- run: npm ci
3243
- run: npm run build
33-
- uses: actions/upload-pages-artifact@v3
44+
env:
45+
PAGES_BASE: ${{ github.event_name == 'pull_request' && format('pr-preview/pr-{0}', github.event.pull_request.number) || '' }}
46+
47+
# deploy the PR to a preview URL
48+
- uses: rossjrw/pr-preview-action@9f77b1d057b494e662c50b8ca40ecc63f21e0887 # v1
49+
if: ${{ github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork }}
3450
with:
35-
path: .vitepress/dist
36-
37-
deploy:
38-
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' }}
39-
permissions:
40-
pages: write
41-
id-token: write
42-
environment:
43-
name: github-pages
44-
url: ${{ steps.deployment.outputs.page_url }}
45-
needs: build
46-
runs-on: ubuntu-latest
47-
name: deploy
48-
steps:
49-
- id: deployment
50-
uses: actions/deploy-pages@v4
51+
source-dir: .vitepress/dist
52+
53+
# deploy the build to GitHub Pages
54+
- uses: JamesIves/github-pages-deploy-action@6c2d9db40f9296374acc17b90404b6e8864128c8 # v4
55+
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main' }}
56+
with:
57+
folder: .vitepress/dist
58+
branch: gh-pages
59+
clean-exclude: pr-preview
60+
force: false

.vitepress/config.mts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ import { fileURLToPath, URL } from 'node:url'
44
// https://vitepress.dev/reference/site-config
55
export default withMermaid({
66
title: "Platform Mesh",
7+
head: [
8+
['link', { rel: 'icon', href: '/favicon.ico' }]
9+
],
710

11+
base: 'PAGES_BASE' in process.env && process.env.PAGES_BASE != '' ? '/' + process.env.PAGES_BASE : '',
812

913
description: "Platform Mesh - Building upon the Kubernetes API & Resource Model",
1014

@@ -14,13 +18,13 @@ export default withMermaid({
1418
{
1519
find: /^.*\/VPFooter\.vue$/,
1620
replacement: fileURLToPath(
17-
new URL('./theme/components/VPFooter.vue', import.meta.url)
21+
new URL('theme/components/VPFooter.vue', import.meta.url)
1822
)
1923
},
2024
{
2125
find: /^.*\/VPFeature\.vue$/,
2226
replacement: fileURLToPath(
23-
new URL('./theme/components/VPFeature.vue', import.meta.url)
27+
new URL('theme/components/VPFeature.vue', import.meta.url)
2428
)
2529
},
2630
]
@@ -32,16 +36,15 @@ export default withMermaid({
3236
// https://vitepress.dev/reference/default-theme-config
3337
nav: [
3438
{ text: 'Home', link: '/' },
35-
{text: 'Overview', link: '/overview'},
39+
{ text: 'Overview', link: '/overview' },
3640
{ text: 'Scenarios', link: '/scenarios' }
3741
],
3842

3943
logo: {
40-
src: './assets/pm_logo.svg',
44+
src: 'pm_logo.svg',
4145
width: 24,
4246
height: 24
4347
},
44-
4548

4649
outline: [2, 3, 4, 5],
4750

@@ -63,7 +66,7 @@ export default withMermaid({
6366
]
6467
}
6568
],
66-
69+
6770
'/scenarios': {
6871
test: 'Scenarios',
6972
items: [
@@ -72,13 +75,12 @@ export default withMermaid({
7275
],
7376
},
7477

75-
7678
},
77-
7879

7980
socialLinks: [
8081
{ icon: 'github', link: 'https://github.com/platform-mesh' }
8182
]
83+
8284
},
83-
85+
8486
})

.vitepress/theme/components/VPFooter.vue

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ Copied and adapted from: https://github.com/vuejs/vitepress/blob/828000099843c98
2929
<script setup lang="ts">
3030
import { useSidebar } from 'vitepress/theme';
3131
import { withBase, useData } from "vitepress";
32-
import euSupportImg from '../assets/eu-support.png'
33-
import neonephosLogo from '../assets/neonephos_logo.svg'
3432
3533
const { hasSidebar } = useSidebar()
3634
const { isDark, title } = useData()
@@ -45,7 +43,7 @@ const projectName = title || 'PlatformMesh'
4543
<div class="funding-image">
4644
<div class="funding-image-container">
4745
<div class="funding-image-bg"></div>
48-
<img :src="euSupportImg" alt="EU and German government funding logos" class="funding-image-src">
46+
<img src="/eu_support.png" alt="EU and German government funding logos" class="funding-image-src">
4947
</div>
5048
</div>
5149
<div class="funding-text">
@@ -68,16 +66,16 @@ const projectName = title || 'PlatformMesh'
6866
</div>
6967

7068
</div>
71-
69+
7270
<!-- Neonephos Logo Section -->
7371
<div class="neonephos-logos">
7472
<a href="https://neonephos.org/" target="_blank" rel="noopener noreferrer" class="neonephos-link">
75-
<img
76-
:src="neonephosLogo"
77-
alt="Neonephos Logo"
73+
<img
74+
src="/neonephos_logo.svg"
75+
alt="Neonephos Logo"
7876
class="neonephos-logo"
7977
>
80-
78+
8179
</a>
8280
</div>
8381

@@ -265,9 +263,9 @@ const projectName = title || 'PlatformMesh'
265263
.footer-columns {
266264
justify-content: flex-start;
267265
}
268-
266+
269267
.neonephos-logo {
270268
max-height: 50px;
271269
}
272270
}
273-
</style>
271+
</style>

assets/pm_logo.png

-947 KB
Binary file not shown.

assets/pm_logo.svg

Lines changed: 0 additions & 58 deletions
This file was deleted.

index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ hero:
77
text: "Building upon the Kubernetes API & Resource Model"
88
tagline: "Discover, order, and orchestrate services across any provider through the beloved kubectl ❤️"
99
image:
10-
src: './assets/pm_logo.svg'
10+
src: '/pm_logo.svg'
1111
alt: 'Platform Mesh'
1212
actions:
1313
- theme: brand
File renamed without changes.

public/favicon.ico

223 KB
Binary file not shown.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)