Skip to content

Commit caa66c4

Browse files
Merge pull request #31 from Rajesh-Nagarajan-11/fix
Fix
2 parents 505013b + 0b0380f commit caa66c4

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@ jobs:
2020
uses: actions/checkout@v6
2121

2222
- name: Install and Build 🔧
23+
env:
24+
PATH_PREFIX: /recognition/pr-preview/pr-${{ github.event.pull_request.number }}
2325
run: |
2426
npm install
2527
node -v
26-
npm run build
28+
npm run build -- --prefix-paths
2729
2830
- name: Broken Link Check 🔗
2931
uses: technote-space/broken-link-checker-action@v2
@@ -45,6 +47,9 @@ jobs:
4547
needs: build
4648
runs-on: ubuntu-latest
4749
if: github.event_name == 'pull_request'
50+
permissions:
51+
contents: write
52+
pull-requests: write
4853
steps:
4954
- name: Checkout 🛎️
5055
uses: actions/checkout@v6
@@ -72,10 +77,12 @@ jobs:
7277
uses: rossjrw/pr-preview-action@v1.6.3
7378
with:
7479
source-dir: public
80+
token: ${{ secrets.GITHUB_TOKEN }}
7581

7682
- name: Remove Preview on Close
7783
if: github.event_name == 'pull_request' && github.event.action == 'closed'
7884
uses: rossjrw/pr-preview-action@v1.6.3
7985
with:
8086
source-dir: public
81-
remove: true
87+
remove: true
88+
token: ${{ secrets.GITHUB_TOKEN }}

gatsby-config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* @type {import('gatsby').GatsbyConfig}
33
*/
44
module.exports = {
5+
pathPrefix: process.env.PATH_PREFIX,
56
siteMetadata: {
67
title: `Layer5 Recognition Program`,
78
description: `Showcasing Your Achievements as a User and a Contributor`,

src/pages/404.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ const NotFoundPage = ({ location }) => {
1111

1212
export const Head = () => <title>404: Not Found</title>
1313

14-
export default NotFoundPage
14+
export default NotFoundPage

0 commit comments

Comments
 (0)