Skip to content

Commit d141e2f

Browse files
Merge branch 'master' into fix/blog-card-ui-cleanup
2 parents 2a6dda9 + fdb1757 commit d141e2f

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

.github/workflows/build-and-preview-site.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,19 @@ jobs:
2929

3030
- name: Checkout PR
3131
if: github.event.action != 'closed'
32-
uses: actions/checkout@v4
32+
uses: actions/checkout@v6
3333
with:
3434
ref: ${{ github.event.pull_request.head.sha }}
3535

3636
- name: Checkout gh-pages for cleanup
3737
if: github.event.action == 'closed'
38-
uses: actions/checkout@v4
38+
uses: actions/checkout@v6
3939
with:
4040
ref: gh-pages
4141

4242
- name: Setup Node
4343
if: github.event.action != 'closed'
44-
uses: actions/setup-node@v4
44+
uses: actions/setup-node@v6
4545
with:
4646
node-version: "20"
4747

@@ -77,7 +77,7 @@ jobs:
7777

7878
- name: Checkout gh-pages for preview retention
7979
if: github.event.action != 'closed'
80-
uses: actions/checkout@v4
80+
uses: actions/checkout@v6
8181
with:
8282
ref: gh-pages
8383
fetch-depth: 0
@@ -131,7 +131,7 @@ jobs:
131131
with:
132132
header: pr-preview
133133
message: |
134-
🚀 Preview deployment: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/pr-preview/pr-${{ github.event.pull_request.number }}/
134+
🚀 Preview deployment: https://layer5.io/pr-preview/pr-${{ github.event.pull_request.number }}/
135135
> *Note: Preview may take a moment (GitHub Pages deployment in progress). Please wait and refresh. Track deployment [here](https://github.com/${{ github.repository }}/actions/workflows/pages/pages-build-deployment)*
136136
137137
- name: Comment on pruned previews

gatsby-config.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ const siteOrigin = (process.env.GATSBY_SITE_URL || "https://layer5.io").replace(
1313
/\/$/,
1414
"",
1515
);
16-
const rawPathPrefix = process.env.PATH_PREFIX || "";
17-
const pathPrefix = rawPathPrefix
18-
? `/${rawPathPrefix.replace(/^\/+|\/+$/g, "")}`
19-
: "";
16+
const rawPrefix = process.env.PATH_PREFIX;
17+
const pathPrefix =
18+
rawPrefix && String(rawPrefix).trim().length
19+
? `/${String(rawPrefix).replace(/^\/+|\/+$/g, "")}`
20+
: undefined;
21+
2022
const siteRootUrl = `${siteOrigin}${pathPrefix}`.replace(/\/$/, "");
2123
const shouldBuildFullSite = isFullSiteBuild();
2224
const isLiteDevBuild = isDevelopment && !shouldBuildFullSite;
@@ -39,6 +41,7 @@ collectionIgnoreGlobs.length > 0
3941
)
4042
: console.info("Build Scope includes all collections");
4143
module.exports = {
44+
...(pathPrefix != null ? { pathPrefix } : {}),
4245
siteMetadata: {
4346
title: "Layer5 - Expect more from your infrastructure",
4447
description:
@@ -49,7 +52,6 @@ module.exports = {
4952
image: "/images/layer5-gradient.webp",
5053
twitterUsername: "@layer5",
5154
},
52-
...(pathPrefix ? { pathPrefix } : {}),
5355
flags: {
5456
FAST_DEV: false,
5557
DEV_SSR: false,

0 commit comments

Comments
 (0)