From c1d8cbf0745008b07bb03575f109be6bd902afff Mon Sep 17 00:00:00 2001 From: Robson Oliveira Date: Thu, 19 Jun 2025 19:51:06 +0200 Subject: [PATCH 01/10] feat: reoganize section to move community impact --- app/page.tsx | 10 +- .../CommunityImpact/CommunityImpact.tsx | 188 ++++++++++++++++++ components/HeroSection/Hero.tsx | 4 +- .../NetworkRoadmapSection.tsx | 187 ----------------- .../ProblemAndSolution/ProblemAndSolution.tsx | 177 +++++++++++++++++ .../WhatIsDeCleanupNetwork.tsx | 172 +--------------- 6 files changed, 375 insertions(+), 363 deletions(-) create mode 100644 components/CommunityImpact/CommunityImpact.tsx create mode 100644 components/ProblemAndSolution/ProblemAndSolution.tsx diff --git a/app/page.tsx b/app/page.tsx index 3a5c079..ec34930 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,17 +1,21 @@ import WhatIsDeCleanupNetwork from "@/components/WhatIsDecleanUp/WhatIsDeCleanupNetwork"; import Hero from "@/components/HeroSection/Hero"; import TokenizeImpactSection from "@/components/HowToTokonizeImpact/TokenizeImpactSection"; -import NetworkRoadmapSection from "@/components/NetworkRoadmapSection/NetworkRoadmapSection" +import NetworkRoadmapSection from "@/components/NetworkRoadmapSection/NetworkRoadmapSection"; +import ProblemAndSolution from "@/components/ProblemAndSolution/ProblemAndSolution"; +import CommunityImpact from "@/components/CommunityImpact/CommunityImpact"; const Page = () => { return (
- + + +
); }; -export default Page; \ No newline at end of file +export default Page; diff --git a/components/CommunityImpact/CommunityImpact.tsx b/components/CommunityImpact/CommunityImpact.tsx new file mode 100644 index 0000000..6f7948f --- /dev/null +++ b/components/CommunityImpact/CommunityImpact.tsx @@ -0,0 +1,188 @@ +import React from "react"; +import Image from "next/image"; + +const galleryImages = [ + { + src: "/testimonial1.jpg", + alt: "Community cleanup 11", + className: "col-span-1 row-span-2", + }, + { + src: "/testimonial2.jpg", + alt: "Community cleanup 2", + className: "col-span-1 row-span-1", + }, + + { + src: "/testimonial3.jpg", + alt: "Community cleanup 3", + className: "col-span-1 row-span-1", + }, + { + src: "/testimonial4.jpg", + alt: "Community cleanup 4", + className: "col-span-1 row-span-2", + }, +]; + +export default function CommunityImpact() { + return ( +
+ {/* Gallery with responsive margins */} +
+
+ {/* Large image on left - full height */} +
+ {galleryImages[0].alt} +
+ + {/* Middle column with two stacked images */} +
+
+ {galleryImages[1].alt} +
+ +
+ {galleryImages[2].alt} +
+
+ + {/* Large image on right - full height */} +
+ {galleryImages[3].alt} +
+
+
+ + {/* Community Impact Section with responsive margins and typography */} +
+ {/* Horizontal Line Separator */} +
+ {/* Header Section - Title and Description side by side */} +
+
+

+ COMMUNITY IMPACT +

+
+
+

+ participants worldwide use DeCleanup dApp to turn real world + impact into onchain products with additional utilities within the + ecosystem in the future. +

+
+
+ + {/* Cards Section - Two cards side by side with responsive spacing */} +
+ {/* HEM Japan - shorter card */} +
+

+ HEM JAPAN +

+

+ Early partner organizing cleanups across Japan using + DeCleanup's verification system. 2024: 12 active users, 9 + cleanup events +

+
+ + {/* Pestathon - taller card */} +
+

+ PESATHON +

+

+ UNNPloggas university campaign combining education + action. + Students learned environmental care while cleaning campus. + DeCleanup added 120 USDGLO to Atlantis Impact Miner rewards.2024: + 9 active users, 4 cleanup events +

+
+
+
+ {/* Horizontal Line Separator */} +
+ + {/* Quote Section with responsive typography */} +
+ {/* Opening Quote Mark */} +
+ + " + +
+ + {/* Main Quote Text */} +
+

+ DeCleanup employs the most simplified system I've encountered + in dApps, making it easier for people to participate in + environmental protection activities. Even picking up a single + plastic bottle can transform into rewards! +

+ + {/* Attribution */} +
+
+

+ YUICHI HOSOMO — NEW JAPAN +

+
+
+
+ + {/* Closing Quote Mark */} +
+ + " + +
+
+ +
+
+ ); +} diff --git a/components/HeroSection/Hero.tsx b/components/HeroSection/Hero.tsx index 9eed41f..d0230a5 100644 --- a/components/HeroSection/Hero.tsx +++ b/components/HeroSection/Hero.tsx @@ -3,7 +3,7 @@ import Divider from "../ui/Divider"; const Hero = () => { return ( -
+
CLEAN UP, SNAP, EARN @@ -29,7 +29,7 @@ const Hero = () => {

- +
diff --git a/components/NetworkRoadmapSection/NetworkRoadmapSection.tsx b/components/NetworkRoadmapSection/NetworkRoadmapSection.tsx index 70f95f7..79ac944 100644 --- a/components/NetworkRoadmapSection/NetworkRoadmapSection.tsx +++ b/components/NetworkRoadmapSection/NetworkRoadmapSection.tsx @@ -1,5 +1,4 @@ import React from "react"; -import Image from "next/image"; const NetworkRoadmapSection = () => { const roadmap = [ @@ -51,30 +50,6 @@ const NetworkRoadmapSection = () => { }, ]; - const galleryImages = [ - { - src: "/testimonial1.jpg", - alt: "Community cleanup 11", - className: "col-span-1 row-span-2", - }, - { - src: "/testimonial2.jpg", - alt: "Community cleanup 2", - className: "col-span-1 row-span-1", - }, - - { - src: "/testimonial3.jpg", - alt: "Community cleanup 3", - className: "col-span-1 row-span-1", - }, - { - src: "/testimonial4.jpg", - alt: "Community cleanup 4", - className: "col-span-1 row-span-2", - }, - ]; - return (
{/* Roadmap Section with responsive margins */} @@ -414,168 +389,6 @@ const NetworkRoadmapSection = () => {
- - {/* Yellow Background Section */} -
- {/* Gallery with responsive margins */} -
-
- {/* Large image on left - full height */} -
- {galleryImages[0].alt} -
- - {/* Middle column with two stacked images */} -
-
- {galleryImages[1].alt} -
- -
- {galleryImages[2].alt} -
-
- - {/* Large image on right - full height */} -
- {galleryImages[3].alt} -
-
-
- - {/* Community Impact Section with responsive margins and typography */} -
- {/* Horizontal Line Separator */} -
- {/* Header Section - Title and Description side by side */} -
-
-

- COMMUNITY IMPACT -

-
-
-

- participants worldwide use DeCleanup dApp to turn real world - impact into onchain products with additional utilities within - the ecosystem in the future. -

-
-
- - {/* Cards Section - Two cards side by side with responsive spacing */} -
- {/* HEM Japan - shorter card */} -
-

- HEM JAPAN -

-

- Early partner organizing cleanups across Japan using - DeCleanup's verification system. 2024: 12 active users, 9 - cleanup events -

-
- - {/* Pestathon - taller card */} -
-

- PESATHON -

-

- UNNPloggas university campaign combining education + action. - Students learned environmental care while cleaning campus. - DeCleanup added 120 USDGLO to Atlantis Impact Miner - rewards.2024: 9 active users, 4 cleanup events -

-
-
-
- {/* Horizontal Line Separator */} -
- - {/* Quote Section with responsive typography */} -
- {/* Opening Quote Mark */} -
- - " - -
- - {/* Main Quote Text */} -
-

- DeCleanup employs the most simplified system I've encountered - in dApps, making it easier for people to participate in - environmental protection activities. Even picking up a single - plastic bottle can transform into rewards! -

- - {/* Attribution */} -
-
-

- YUICHI HOSOMO — NEW JAPAN -

-
-
-
- - {/* Closing Quote Mark */} -
- - " - -
-
- -
-
); }; diff --git a/components/ProblemAndSolution/ProblemAndSolution.tsx b/components/ProblemAndSolution/ProblemAndSolution.tsx new file mode 100644 index 0000000..e154cc9 --- /dev/null +++ b/components/ProblemAndSolution/ProblemAndSolution.tsx @@ -0,0 +1,177 @@ +import React from "react"; + +interface ProblemSectionProps { + hideHeader?: boolean; +} + +function ProblemSection({ hideHeader = false }: ProblemSectionProps) { + const problems = [ + { + title: "LACK OF INCENTIVES FOR CLEANUP ACTIONS", + }, + { + title: "LIMITS FOR RECOGNITION AND QUANTIFICATION OF PERSONAL IMPACT", + }, + { + title: "WEAK GLOBAL COORDINATION", + }, + ]; + + return ( +
+ {!hideHeader && ( +
+

+ THE PROBLEM +

+
+ )} + +
+ {problems.map((problem, index) => ( +
+

+ {problem.title} +

+
+ ))} +
+
+ ); +} + +interface SolutionSectionProps { + hideHeader?: boolean; +} + +function SolutionSection({ hideHeader = false }: SolutionSectionProps) { + const solutions = [ + { + title: "TOKENIZING IMPACT INTO IMPACT PRODUCTS", + description: + "Turn each cleanup into a dynamic onchain Impact Product - visible, growing assets tied to real action. Creates lasting value beyond the cleanup moment.", + }, + { + title: "SCALABLE PERSONAL RECOGNITION SYSTEM", + description: + "Earn visibility and status reflecting actual environmental contributions. Unlock levels, metrics, and benefits based on your actions.", + }, + { + title: "GLOBAL NETWORK OF COORDINATED ACTION", + description: + "Ambassador program + partner communities + decentralized tech = local efforts connected into one shared, scalable ecosystem", + }, + ]; + + return ( +
+ {!hideHeader && ( +
+

THE SOLUTION

+
+ )} + +
+ {solutions.map((solution, index) => ( +
+

+ {solution.title} +

+

+ {solution.description} +

+
+ ))} +
+
+ ); +} + +export default function ProblemAndSolution() { + return ( + <> +
+ {/* Horizontal Line Separator */} +
+ + {/* Problem-Solution Headers with horizontal line */} +
+
+

+ THE PROBLEM +

+
+

+ THE SOLUTION +

+
+
+ + {/* Problem-Solution Content Side by Side */} +
+
+ +
+
+ +
+
+
+ + {/* Mobile Layout: Stacked with vertical line */} +
+ {/* Mobile Problem Section */} +
+
+

+ THE PROBLEM +

+
+ + {/* Problem content with vertical line */} +
+ {/* Vertical line at the left edge */} +
+ + {/* Problem items */} +
+ +
+
+
+ + {/* Mobile Solution Section */} +
+
+

+ THE SOLUTION +

+
+ + {/* Solution content without vertical line */} +
+ +
+
+
+ + ); +} diff --git a/components/WhatIsDecleanUp/WhatIsDeCleanupNetwork.tsx b/components/WhatIsDecleanUp/WhatIsDeCleanupNetwork.tsx index 444796d..bd1e8f7 100644 --- a/components/WhatIsDecleanUp/WhatIsDeCleanupNetwork.tsx +++ b/components/WhatIsDecleanUp/WhatIsDeCleanupNetwork.tsx @@ -1,107 +1,8 @@ import React from "react"; -interface ProblemSectionProps { - hideHeader?: boolean; -} - -function ProblemSection({ hideHeader = false }: ProblemSectionProps) { - const problems = [ - { - title: "LACK OF INCENTIVES FOR CLEANUP ACTIONS", - }, - { - title: "LIMITS FOR RECOGNITION AND QUANTIFICATION OF PERSONAL IMPACT", - }, - { - title: "WEAK GLOBAL COORDINATION", - }, - ]; - - return ( -
- {!hideHeader && ( -
-

- THE PROBLEM -

-
- )} - -
- {problems.map((problem, index) => ( -
-

- {problem.title} -

-
- ))} -
-
- ); -} - -interface SolutionSectionProps { - hideHeader?: boolean; -} - -function SolutionSection({ hideHeader = false }: SolutionSectionProps) { - const solutions = [ - { - title: "TOKENIZING IMPACT INTO IMPACT PRODUCTS", - description: - "Turn each cleanup into a dynamic onchain Impact Product - visible, growing assets tied to real action. Creates lasting value beyond the cleanup moment.", - }, - { - title: "SCALABLE PERSONAL RECOGNITION SYSTEM", - description: - "Earn visibility and status reflecting actual environmental contributions. Unlock levels, metrics, and benefits based on your actions.", - }, - { - title: "GLOBAL NETWORK OF COORDINATED ACTION", - description: - "Ambassador program + partner communities + decentralized tech = local efforts connected into one shared, scalable ecosystem", - }, - ]; - - return ( -
- {!hideHeader && ( -
-

THE SOLUTION

-
- )} - -
- {solutions.map((solution, index) => ( -
-

- {solution.title} -

-

- {solution.description} -

-
- ))} -
-
- ); -} - export default function WhatIsDeCleanupNetwork() { return ( -
+
@@ -148,77 +49,6 @@ export default function WhatIsDeCleanupNetwork() {
- -
- {/* Horizontal Line Separator */} -
- - {/* Problem-Solution Headers with horizontal line */} -
-
-

- THE PROBLEM -

-
-

- THE SOLUTION -

-
-
- - {/* Problem-Solution Content Side by Side */} -
-
- -
-
- -
-
-
- - {/* Mobile Layout: Stacked with vertical line */} -
- {/* Mobile Problem Section */} -
-
-

- THE PROBLEM -

-
- - {/* Problem content with vertical line */} -
- {/* Vertical line at the left edge */} -
- - {/* Problem items */} -
- -
-
-
- - {/* Mobile Solution Section */} -
-
-

- THE SOLUTION -

-
- - {/* Solution content without vertical line */} -
- -
-
-
); From 335b200d37e655e6fa86afde8a779c3c00ad5e6e Mon Sep 17 00:00:00 2001 From: Robson Oliveira Date: Sun, 22 Jun 2025 14:05:36 +0200 Subject: [PATCH 02/10] feat: reorganize sections, padding and move the network to the top --- app/page.tsx | 32 +- .../CommunityImpact/CommunityImpact.tsx | 2 +- components/HeroSection/Hero.tsx | 6 +- .../TokenizeImpactSection.tsx | 2 +- .../NetworkRoadmapSection.tsx | 615 +++++++++--------- .../WhatIsDeCleanupNetwork.tsx | 4 +- components/ui/Section.tsx | 34 + 7 files changed, 371 insertions(+), 324 deletions(-) create mode 100644 components/ui/Section.tsx diff --git a/app/page.tsx b/app/page.tsx index ec34930..e3d90ad 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -4,16 +4,36 @@ import TokenizeImpactSection from "@/components/HowToTokonizeImpact/TokenizeImpa import NetworkRoadmapSection from "@/components/NetworkRoadmapSection/NetworkRoadmapSection"; import ProblemAndSolution from "@/components/ProblemAndSolution/ProblemAndSolution"; import CommunityImpact from "@/components/CommunityImpact/CommunityImpact"; +import { SectionPadded, SectionFullWithPadding } from "@/components/ui/Section"; const Page = () => { return (
- - - - - - +
+ + + + + + + + + + + + + + + + + + + + + + + +
); }; diff --git a/components/CommunityImpact/CommunityImpact.tsx b/components/CommunityImpact/CommunityImpact.tsx index 6f7948f..3c4656c 100644 --- a/components/CommunityImpact/CommunityImpact.tsx +++ b/components/CommunityImpact/CommunityImpact.tsx @@ -27,7 +27,7 @@ const galleryImages = [ export default function CommunityImpact() { return ( -
+
{/* Gallery with responsive margins */}
diff --git a/components/HeroSection/Hero.tsx b/components/HeroSection/Hero.tsx index d0230a5..a42ae12 100644 --- a/components/HeroSection/Hero.tsx +++ b/components/HeroSection/Hero.tsx @@ -4,7 +4,7 @@ import Divider from "../ui/Divider"; const Hero = () => { return (
-
+
CLEAN UP, SNAP, EARN @@ -14,7 +14,7 @@ const Hero = () => { DECLEANUP NETWORK -
+

@@ -30,7 +30,7 @@ const Hero = () => {

-
+
diff --git a/components/HowToTokonizeImpact/TokenizeImpactSection.tsx b/components/HowToTokonizeImpact/TokenizeImpactSection.tsx index e13fc88..bfac455 100644 --- a/components/HowToTokonizeImpact/TokenizeImpactSection.tsx +++ b/components/HowToTokonizeImpact/TokenizeImpactSection.tsx @@ -26,7 +26,7 @@ const TokenizeImpactSection = () => { return (
-
+
{/* Hero Section */}
diff --git a/components/NetworkRoadmapSection/NetworkRoadmapSection.tsx b/components/NetworkRoadmapSection/NetworkRoadmapSection.tsx index 79ac944..738a5bf 100644 --- a/components/NetworkRoadmapSection/NetworkRoadmapSection.tsx +++ b/components/NetworkRoadmapSection/NetworkRoadmapSection.tsx @@ -51,339 +51,332 @@ const NetworkRoadmapSection = () => { ]; return ( -
- {/* Roadmap Section with responsive margins */} -
-
- {/* Header */} -
-

- NETWORK ROADMAP -

-
+
+ {/* Header */} +
+

+ NETWORK ROADMAP +

+
- {/* Desktop Roadmap - Original Style */} -
- {/* Connecting lines - visible on larger screens */} -
-
-
-
-
-
-
-
+ {/* Desktop Roadmap - Original Style */} +
+ {/* Connecting lines - visible on larger screens */} +
+
+
+
+
+
+
+
- {roadmap.map((item, index) => ( -
- {/* Connection dot */} -
+ {roadmap.map((item, index) => ( +
+ {/* Connection dot */} +
-
-

- {item.phase} -

-

- {item.description} -

+
+

+ {item.phase} +

+

+ {item.description} +

-
-

- {item.version} -

-
    - {item.features.map((feature, idx) => ( -
  • - {feature} -
  • - ))} -
-
-
+
+

+ {item.version} +

+
    + {item.features.map((feature, idx) => ( +
  • + {feature} +
  • + ))} +
- ))} +
+ ))} +
- {/* Mobile/Tablet Roadmap */} -
- {/* Vertical connecting line */} -
+ {/* Mobile/Tablet Roadmap */} +
+ {/* Vertical connecting line */} +
-
- {/* Point 1 - Foundation Phase */} -
-
-
-
-

- FOUNDATION PHASE -

-

- initial community partnerships activated -

-
-
+
+ {/* Point 1 - Foundation Phase */} +
+
+
+
+

+ FOUNDATION PHASE +

+

+ initial community partnerships activated +

+
+
- {/* Point 2 - System Growth */} -
-
-
-
-

- SYSTEM GROWTH -

-

- collaboration with regen coordination -

-
-
+ {/* Point 2 - System Growth */} +
+
+
+
+

+ SYSTEM GROWTH +

+

+ collaboration with regen coordination +

+
+
- {/* Point 3 - Activation */} -
-
-
-
-

- ACTIVATION -

-

- launching global ambassador program -

-
-
+ {/* Point 3 - Activation */} +
+
+
+
+

+ ACTIVATION +

+

+ launching global ambassador program +

+
+
- {/* Point 4 - Regional Scaling */} -
-
-
-
-

- REGIONAL SCALING -

-

- multi-region coordination and governance -

-
-
+ {/* Point 4 - Regional Scaling */} +
+
+
+
+

+ REGIONAL SCALING +

+

+ multi-region coordination and governance +

+
+
- {/* Point 5 - DAPP V1 */} -
-
-
-
-

- DAPP V1 -

-
    -
  • BASIC POI SUBMISSION
  • -
  • IMPACT PRODUCTS
  • -
  • POINTS AND IMPACT VALUE
  • -
-
-
+ {/* Point 5 - DAPP V1 */} +
+
+
+
+

+ DAPP V1 +

+
    +
  • BASIC POI SUBMISSION
  • +
  • IMPACT PRODUCTS
  • +
  • POINTS AND IMPACT VALUE
  • +
+
+
- {/* Point 6 - DAPP V2.1 */} -
-
-
-
-

- DAPP V2.1 -

-
    -
  • IMPROVED POI SUBMISSION
  • -
  • PERSONAL DASHBOARD
  • -
  • REFERRAL SYSTEM
  • -
  • LEADERBOARD
  • -
-
-
+ {/* Point 6 - DAPP V2.1 */} +
+
+
+
+

+ DAPP V2.1 +

+
    +
  • IMPROVED POI SUBMISSION
  • +
  • PERSONAL DASHBOARD
  • +
  • REFERRAL SYSTEM
  • +
  • LEADERBOARD
  • +
+
+
- {/* Point 7 - DAPP V2.2 */} -
-
-
-
-

- DAPP V2.2 -

-
    -
  • $DCU TOKEN LAUNCH
  • -
  • STAKING AND LOCKING
  • -
  • COMMUNITY VERIFICATION
  • -
  • IMPACT CIRCLES
  • -
  • - INTEGRATION WITH REGEN BAZAAR -
  • -
  • MULTICHAIN ROLLOUT
  • -
-
-
+ {/* Point 7 - DAPP V2.2 */} +
+
+
+
+

+ DAPP V2.2 +

+
    +
  • $DCU TOKEN LAUNCH
  • +
  • STAKING AND LOCKING
  • +
  • COMMUNITY VERIFICATION
  • +
  • IMPACT CIRCLES
  • +
  • INTEGRATION WITH REGEN BAZAAR
  • +
  • MULTICHAIN ROLLOUT
  • +
+
+
- {/* Point 8 - DAPP V3 */} -
-
-
-
-

- DAPP V3 -

-
    -
  • NEW IMPACT PRODUCT LEVELS
  • -
  • GOVERNANCE TOOLS
  • -
  • IMPACT METRICS
  • -
  • MULTICHAIN POAPS
  • -
  • INTEGRATIONS WITH PARTNERS
  • -
-
-
+ {/* Point 8 - DAPP V3 */} +
+
+
+
+

+ DAPP V3 +

+
    +
  • NEW IMPACT PRODUCT LEVELS
  • +
  • GOVERNANCE TOOLS
  • +
  • IMPACT METRICS
  • +
  • MULTICHAIN POAPS
  • +
  • INTEGRATIONS WITH PARTNERS
  • +
diff --git a/components/WhatIsDecleanUp/WhatIsDeCleanupNetwork.tsx b/components/WhatIsDecleanUp/WhatIsDeCleanupNetwork.tsx index bd1e8f7..29db7d0 100644 --- a/components/WhatIsDecleanUp/WhatIsDeCleanupNetwork.tsx +++ b/components/WhatIsDecleanUp/WhatIsDeCleanupNetwork.tsx @@ -2,8 +2,8 @@ import React from "react"; export default function WhatIsDeCleanupNetwork() { return ( -
-
+
+
What is DeCleanup Network? diff --git a/components/ui/Section.tsx b/components/ui/Section.tsx new file mode 100644 index 0000000..fa8397e --- /dev/null +++ b/components/ui/Section.tsx @@ -0,0 +1,34 @@ +import React from "react"; + +interface SectionProps { + children: React.ReactNode; + className?: string; +} + +// Section with consistent lateral padding +export const SectionPadded: React.FC = ({ + children, + className = "", +}) => { + return
{children}
; +}; + +// Full-width section without padding +export const SectionFull: React.FC = ({ + children, + className = "", +}) => { + return
{children}
; +}; + +// Full-width section with inner padding +export const SectionFullWithPadding: React.FC = ({ + children, + className = "", +}) => { + return ( +
+
{children}
+
+ ); +}; From 19814f255fb4ee0ac5667bb95c6f3e0818f3100e Mon Sep 17 00:00:00 2001 From: Robson Oliveira Date: Sat, 5 Jul 2025 16:34:00 +0200 Subject: [PATCH 03/10] fix: remove the exports script --- .github/workflows/preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 546053c..707f6fd 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -28,7 +28,7 @@ jobs: run: | export BASE_PATH="/pr-preview/pr-${{ github.event.pull_request.number }}" echo "BASE_PATH=$BASE_PATH" >> $GITHUB_ENV - npm run build && npm run export + npm run build - name: Upload artifact uses: actions/upload-pages-artifact@v3 From d01faa8e7c809cc5bbbee617b4f0e8da94151cee Mon Sep 17 00:00:00 2001 From: Robson Oliveira Date: Sat, 5 Jul 2025 16:40:08 +0200 Subject: [PATCH 04/10] fix: try to fix permission for token --- .github/workflows/preview.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 707f6fd..9c60f59 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -42,6 +42,8 @@ jobs: publish_dir: ./out destination_dir: pr-preview/pr-${{ github.event.pull_request.number }} publish_branch: gh-pages + pages: write + id-token: write - name: Comment PR with Preview URL uses: marocchino/sticky-pull-request-comment@v2 From 42045e36be3ee9751fed6bf226a8c6147e2f8242 Mon Sep 17 00:00:00 2001 From: Robson Oliveira Date: Sat, 5 Jul 2025 18:26:16 +0200 Subject: [PATCH 05/10] fix: remove permissions from the the step --- .github/workflows/preview.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 9c60f59..34f4bc3 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -9,6 +9,7 @@ jobs: build-and-deploy-preview: runs-on: ubuntu-latest permissions: + contents: write pages: write id-token: write @@ -42,8 +43,6 @@ jobs: publish_dir: ./out destination_dir: pr-preview/pr-${{ github.event.pull_request.number }} publish_branch: gh-pages - pages: write - id-token: write - name: Comment PR with Preview URL uses: marocchino/sticky-pull-request-comment@v2 From 76918f398b07d801d698ff13eb440e611465c263 Mon Sep 17 00:00:00 2001 From: Robson Oliveira Date: Sat, 5 Jul 2025 18:29:07 +0200 Subject: [PATCH 06/10] fix: preview url --- .github/workflows/preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 34f4bc3..e4d2e73 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -49,4 +49,4 @@ jobs: with: header: preview-url message: | - 🚀 Preview deployed: https://.github.io/pr-preview/pr-${{ github.event.pull_request.number }} + 🚀 Preview deployed: https://decleanup-network.github.io/pr-preview/pr-${{ github.event.pull_request.number }} From 550e5aa504243cafeba69c03a8ae59c78f9a0b1a Mon Sep 17 00:00:00 2001 From: Robson Oliveira Date: Sat, 5 Jul 2025 18:42:44 +0200 Subject: [PATCH 07/10] fix: add pages setup --- .github/workflows/preview.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index e4d2e73..dfdfe4c 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -25,6 +25,15 @@ jobs: - name: Install dependencies run: npm install + - name: Setup Pages + uses: actions/configure-pages@v5 + with: + # Automatically inject basePath in your Next.js configuration file and disable + # server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized). + # + # You may remove this line if you want to manage the configuration yourself. + static_site_generator: next + - name: Build static site run: | export BASE_PATH="/pr-preview/pr-${{ github.event.pull_request.number }}" From 60d60223353ef731ddd2386f66db68a0bf1fd416 Mon Sep 17 00:00:00 2001 From: Robson Oliveira Date: Sat, 5 Jul 2025 18:45:38 +0200 Subject: [PATCH 08/10] fix: add token to the PR comment --- .github/workflows/preview.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index dfdfe4c..fc83664 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -57,5 +57,6 @@ jobs: uses: marocchino/sticky-pull-request-comment@v2 with: header: preview-url + github_token: ${{ secrets.GITHUB_TOKEN }} message: | 🚀 Preview deployed: https://decleanup-network.github.io/pr-preview/pr-${{ github.event.pull_request.number }} From 03fbbf7e46bbb0540b2277a7ca3b684f240f5dce Mon Sep 17 00:00:00 2001 From: Robson Oliveira Date: Sat, 5 Jul 2025 18:56:44 +0200 Subject: [PATCH 09/10] fix: try to skip jekyll --- .github/workflows/preview.yml | 17 ++++------------- next.config.ts | 2 ++ public/.nojekyll | 1 + 3 files changed, 7 insertions(+), 13 deletions(-) create mode 100644 public/.nojekyll diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index fc83664..de32158 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -12,6 +12,7 @@ jobs: contents: write pages: write id-token: write + pull-requests: write steps: - name: Checkout repo @@ -25,25 +26,14 @@ jobs: - name: Install dependencies run: npm install - - name: Setup Pages - uses: actions/configure-pages@v5 - with: - # Automatically inject basePath in your Next.js configuration file and disable - # server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized). - # - # You may remove this line if you want to manage the configuration yourself. - static_site_generator: next - - name: Build static site run: | export BASE_PATH="/pr-preview/pr-${{ github.event.pull_request.number }}" echo "BASE_PATH=$BASE_PATH" >> $GITHUB_ENV npm run build - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - path: ./out + - name: Create .nojekyll file + run: touch out/.nojekyll - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v4 @@ -52,6 +42,7 @@ jobs: publish_dir: ./out destination_dir: pr-preview/pr-${{ github.event.pull_request.number }} publish_branch: gh-pages + force_orphan: false - name: Comment PR with Preview URL uses: marocchino/sticky-pull-request-comment@v2 diff --git a/next.config.ts b/next.config.ts index 6b67621..21a9672 100644 --- a/next.config.ts +++ b/next.config.ts @@ -7,6 +7,8 @@ const nextConfig = { }, basePath: process.env.BASE_PATH || "", assetPrefix: process.env.BASE_PATH || "", + trailingSlash: true, + skipTrailingSlashRedirect: true, }; module.exports = nextConfig; diff --git a/public/.nojekyll b/public/.nojekyll new file mode 100644 index 0000000..3cb1807 --- /dev/null +++ b/public/.nojekyll @@ -0,0 +1 @@ +# This file tells GitHub Pages not to process this site with Jekyll \ No newline at end of file From 52a2bd45f78c61ded0b91bb0c159e3ff88550edf Mon Sep 17 00:00:00 2001 From: Robson Oliveira Date: Tue, 8 Jul 2025 13:11:59 +0200 Subject: [PATCH 10/10] fix: try to use the actions/deploy-pages@v4 --- .github/workflows/preview.yml | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index de32158..3a1213a 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -9,7 +9,7 @@ jobs: build-and-deploy-preview: runs-on: ubuntu-latest permissions: - contents: write + contents: read pages: write id-token: write pull-requests: write @@ -35,14 +35,28 @@ jobs: - name: Create .nojekyll file run: touch out/.nojekyll - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v4 + - name: Debug build output + run: | + echo "BASE_PATH is: $BASE_PATH" + ls -la out/ + echo "Checking if index.html exists:" + find out/ -name "index.html" -type f + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./out - destination_dir: pr-preview/pr-${{ github.event.pull_request.number }} - publish_branch: gh-pages - force_orphan: false + path: ./out + + deploy-preview: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build-and-deploy-preview + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 - name: Comment PR with Preview URL uses: marocchino/sticky-pull-request-comment@v2 @@ -50,4 +64,4 @@ jobs: header: preview-url github_token: ${{ secrets.GITHUB_TOKEN }} message: | - 🚀 Preview deployed: https://decleanup-network.github.io/pr-preview/pr-${{ github.event.pull_request.number }} + 🚀 Preview deployed: ${{ steps.deployment.outputs.page_url }}/pr-preview/pr-${{ github.event.pull_request.number }}