Skip to content

Commit

Permalink
Change env secrets to work with next
Browse files Browse the repository at this point in the history
  • Loading branch information
alanchangxyz committed Apr 2, 2024
1 parent 82e7d4e commit 595bc38
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ concurrency:
cancel-in-progress: false

env:
MAINTENANCE_MODE_RESOURCES: ${{ secrets.MAINTENANCE_MODE_RESOURCES }}
MAINTENANCE_MODE_SCHEDULE: ${{ secrets.MAINTENANCE_MODE_SCHEDULE }}
MAINTENANCE_MODE_WORKSHOPS: ${{ secrets.MAINTENANCE_MODE_WORKSHOPS }}
NEXT_PUBLIC_MAINTENANCE_MODE_RESOURCES: ${{ secrets.NEXT_PUBLIC_MAINTENANCE_MODE_RESOURCES }}
NEXT_PUBLIC_MAINTENANCE_MODE_SCHEDULE: ${{ secrets.NEXT_PUBLIC_MAINTENANCE_MODE_SCHEDULE }}
NEXT_PUBLIC_MAINTENANCE_MODE_WORKSHOPS: ${{ secrets.NEXT_PUBLIC_MAINTENANCE_MODE_WORKSHOPS }}

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion src/app/(main)/resources/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ import "./Resources.scss";
// );
// }

const Resources = () => process.env.MAINTENANCE_MODE_RESOURCES ? redirect("/") : <p>Resources</p>;
const Resources = () => process.env.NEXT_PUBLIC_MAINTENANCE_MODE_RESOURCES ? redirect("/") : <p>Resources</p>;

export default Resources;
2 changes: 1 addition & 1 deletion src/app/(main)/schedule/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ import "./Schedule.scss";
// </div>
// );

const Schedule = () => process.env.MAINTENANCE_MODE_SCHEDULE ? redirect("/") :<p>Schedule</p>;
const Schedule = () => process.env.NEXT_PUBLIC_MAINTENANCE_MODE_SCHEDULE ? redirect("/") :<p>Schedule</p>;

export default Schedule;
2 changes: 1 addition & 1 deletion src/app/(main)/workshops/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ import "./Workshops.scss";
// );
// };

const Workshops = () => process.env.MAINTENANCE_MODE_WORKSHOPS ? redirect("/") : <p>Workshops</p>;
const Workshops = () => process.env.NEXT_PUBLIC_MAINTENANCE_MODE_WORKSHOPS ? redirect("/") : <p>Workshops</p>;

export default Workshops;

0 comments on commit 595bc38

Please sign in to comment.