Skip to content

Commit 0e858aa

Browse files
FEATURE (deployment): Update deployment to GitHub pages
1 parent b06e604 commit 0e858aa

File tree

7 files changed

+78
-47
lines changed

7 files changed

+78
-47
lines changed

.github/workflows/build-css.yml

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

.github/workflows/deploy.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Deploy Next.js to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- website
7+
workflow_dispatch:
8+
9+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
16+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
17+
concurrency:
18+
group: "pages"
19+
cancel-in-progress: false
20+
21+
jobs:
22+
build:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
28+
- name: Setup Node.js
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: "20"
32+
cache: "npm"
33+
34+
- name: Setup Pages
35+
uses: actions/configure-pages@v5
36+
with:
37+
static_site_generator: next
38+
39+
- name: Install dependencies
40+
run: npm ci
41+
42+
- name: Build with Next.js
43+
run: npm run build
44+
45+
- name: Upload artifact
46+
uses: actions/upload-pages-artifact@v3
47+
with:
48+
path: ./out
49+
50+
deploy:
51+
environment:
52+
name: github-pages
53+
url: ${{ steps.deployment.outputs.page_url }}
54+
runs-on: ubuntu-latest
55+
needs: build
56+
steps:
57+
- name: Deploy to GitHub Pages
58+
id: deployment
59+
uses: actions/deploy-pages@v4
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import type { Metadata } from "next";
2+
3+
export const metadata: Metadata = {
4+
robots: "noindex, nofollow",
5+
};
6+
7+
export default function GoogleOAuthLayout({
8+
children,
9+
}: {
10+
children: React.ReactNode;
11+
}) {
12+
return <>{children}</>;
13+
}

app/storages/google-oauth/page.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
"use client";
22

33
import { useEffect } from "react";
4-
import type { Metadata } from "next";
5-
6-
export const metadata: Metadata = {
7-
robots: "noindex, nofollow",
8-
};
94

105
export default function GoogleOAuthPage() {
116
useEffect(() => {

next.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import type { NextConfig } from "next";
22

33
const nextConfig: NextConfig = {
4+
output: "export", // Enable static exports for GitHub Pages
5+
trailingSlash: true, // Ensures proper routing on GitHub Pages
6+
images: {
7+
unoptimized: true, // Required for static export
8+
},
49
async redirects() {
510
return [
611
// Old storage URLs to new structure

public/.nojekyll

Whitespace-only changes.

public/CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
postgresus.com

0 commit comments

Comments
 (0)