-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
63 changed files
with
6,701 additions
and
3,192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,6 @@ node_modules | |
.husky | ||
.direnv | ||
flake.lock | ||
flake.nix | ||
flake.nix | ||
*.md | ||
*.env.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Publish Preview Image | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [main, "refactor/app-router"] | ||
paths: | ||
- "app/**" | ||
- "next.config.js" | ||
- "package.json" | ||
- "tailwind.config.js" | ||
- "Dockerfile" | ||
|
||
jobs: | ||
push_to_registry: | ||
name: Push Image to Docker Hub | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Log Into Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
|
||
- name: Set Short SHA | ||
id: short_sha | ||
run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | ||
|
||
- name: Build/Push Image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
push: true | ||
build-args: | | ||
NEXT_PUBLIC_IS_PREVIEW=1 | ||
NEXT_PUBLIC_BUILD_SHA=${{ steps.short_sha.outputs.short_sha }} | ||
NEXT_PUBLIC_BUILD_ID=${{ github.run_id }} | ||
NEXT_PUBLIC_BUILD_NUM=${{ github.run_number }} | ||
secrets: | | ||
REPOS_READ_ONLY=${{ secrets.REPOS_READ_ONLY }} | ||
tags: ${{ secrets.DOCKER_USERNAME }}/website:preview | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Publish Production Image | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
push_to_registry: | ||
name: Push Image to Docker Hub | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Log Into Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
|
||
- name: Set Short SHA | ||
id: short_sha | ||
run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | ||
|
||
- name: Build/Push Image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
push: true | ||
build-args: | ||
NEXT_PUBLIC_BUILD_SHA=${{ steps.short_sha.outputs.short_sha }} | ||
NEXT_PUBLIC_BUILD_ID=${{ github.run_id }} | ||
NEXT_PUBLIC_BUILD_NUM=${{ github.run_number }} | ||
secrets: | | ||
REPOS_READ_ONLY=${{ secrets.REPOS_READ_ONLY }} | ||
tags: ${{ secrets.DOCKER_USERNAME }}/website:${{ github.ref_name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
nodeLinker: node-modules | ||
|
||
yarnPath: .yarn/releases/yarn-3.6.1.cjs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,58 @@ | ||
# Installing Dependencies | ||
FROM node:18-alpine AS deps | ||
# Dependencies Image | ||
FROM node:20-alpine AS deps | ||
RUN apk add --no-cache libc6-compat | ||
WORKDIR /app | ||
COPY package.json yarn.lock ./ | ||
RUN yarn install --frozen-lockfile | ||
|
||
COPY package.json yarn.lock .yarnrc.yml ./ | ||
COPY .yarn ./.yarn | ||
|
||
RUN yarn set version berry | ||
RUN yarn install --immutable | ||
RUN yarn add sharp | ||
|
||
# Building Website | ||
FROM node:18-alpine AS builder | ||
# Build Image | ||
FROM node:20-alpine AS builder | ||
WORKDIR /app | ||
COPY --from=deps /app/node_modules ./node_modules | ||
COPY . . | ||
RUN yarn build | ||
|
||
ENV NEXT_TELEMETRY_DISABLED 1 | ||
|
||
# Keep as empty string as Typescript parses empty strings as false | ||
ARG NEXT_PUBLIC_IS_PREVIEW="" | ||
ENV NEXT_PUBLIC_IS_PREVIEW=$NEXT_PUBLIC_IS_PREVIEW | ||
ARG NEXT_PUBLIC_BUILD_SHA | ||
ENV NEXT_PUBLIC_BUILD_SHA=$NEXT_PUBLIC_BUILD_SHA | ||
ARG NEXT_PUBLIC_BUILD_ID | ||
ENV NEXT_PUBLIC_BUILD_ID=$NEXT_PUBLIC_BUILD_ID | ||
ARG NEXT_PUBLIC_BUILD_NUM | ||
ENV NEXT_PUBLIC_BUILD_NUM=$NEXT_PUBLIC_BUILD_NUM | ||
|
||
RUN --mount=type=secret,id=REPOS_READ_ONLY \ | ||
REPOS_READ_ONLY=$(cat /run/secrets/REPOS_READ_ONLY) \ | ||
yarn build | ||
|
||
# Production Image | ||
FROM node:18-alpine AS runner | ||
FROM node:20-alpine AS runner | ||
WORKDIR /app | ||
ENV NODE_ENV production | ||
ENV NEXT_TELEMETRY_DISABLED 1 | ||
|
||
RUN addgroup -g 1001 -S nodejs | ||
RUN adduser -S nextjs -u 1001 | ||
|
||
RUN addgroup --system --gid 1001 nextjsgroup | ||
RUN adduser --system --uid 1001 nextjsuser | ||
COPY --from=builder /app/public ./public | ||
|
||
# Automatically leverage output traces to reduce image size | ||
# https://nextjs.org/docs/advanced-features/output-file-tracing | ||
COPY --from=builder --chown=nextjsuser:nextjsgroup /app/public ./public | ||
COPY --from=builder --chown=nextjsuser:nextjsgroup /app/package.json ./package.json | ||
COPY --from=builder --chown=nextjsuser:nextjsgroup /app/.next/standalone ./ | ||
COPY --from=builder --chown=nextjsuser:nextjsgroup /app/.next/static ./.next/static | ||
COPY --from=builder --chown=nextjsuser:nextjsgroup /app/node_modules/next/dist/compiled/jest-worker ./node_modules/next/dist/compiled/jest-worker | ||
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ | ||
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static | ||
|
||
USER nextjsuser | ||
USER nextjs | ||
|
||
EXPOSE 3000 | ||
ENTRYPOINT ["node", "server.js"] | ||
|
||
ENV PORT 3000 | ||
ENV HOSTNAME localhost | ||
|
||
CMD ["node", "server.js"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { FancyUnderline, GroupedText, Text } from "./utils/Text"; | ||
|
||
export const About = () => { | ||
return ( | ||
<GroupedText className="text-center"> | ||
<Text> | ||
I am a{" "} | ||
<FancyUnderline className="font-semibold" decoration="decoration-green"> | ||
software engineer | ||
</FancyUnderline>{" "} | ||
at the BBC and a{" "} | ||
<FancyUnderline className="font-semibold" decoration="decoration-red">student</FancyUnderline>, | ||
currently pursuing a BSc in Software Engineering at the University of | ||
Glasgow. | ||
</Text> | ||
<Text> | ||
You'll usually find me nerding out about technology and playing | ||
video games. I also really enjoy contributing to open source projects, | ||
mainly{" "} | ||
<FancyUnderline className="font-semibold" decoration="decoration-peach"> | ||
Catppuccin | ||
</FancyUnderline> | ||
. | ||
</Text> | ||
</GroupedText> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
import { Text } from "./utils/Text"; | ||
import { | ||
GitHub, | ||
Gitea, | ||
Instagram, | ||
LinkedIn, | ||
Twitter, | ||
} from "./icons/SocialMedia"; | ||
import Link from "next/link"; | ||
import { Heart } from "./icons/Heart"; | ||
import { ExternalLink } from "./icons/ExternalLink"; | ||
|
||
export const Footer = () => { | ||
return ( | ||
<footer className="border-t-2 border-surface1 w-full text-subtext1"> | ||
<div className="flex flex-col justify-center items-center space-y-6 pt-10 pb-20"> | ||
<div className="text-center"> | ||
<p className="text-lg lg:text-xl xl:text-2xl"> | ||
Designed With <Heart /> | ||
</p> | ||
<Text>© {new Date().getFullYear()} Goudham Suresh</Text> | ||
</div> | ||
<BuildInfo /> | ||
<SocialMediaRow /> | ||
</div> | ||
</footer> | ||
); | ||
}; | ||
|
||
const BuildInfo = () => { | ||
return ( | ||
<div className="text-center text-md lg:text-lg xl:text-xl"> | ||
<p>{process.env.NEXT_PUBLIC_IS_PREVIEW ? "Preview" : "Release"} Build</p> | ||
<p> | ||
GitHub SHA:{" "} | ||
<Link | ||
rel="noopener noreferrer" | ||
target="_blank" | ||
className="hocus:underline hocus:decoration-solid hocus:underline-offset-1" | ||
href={`https://github.com/sgoudham/website/commit/${process.env.NEXT_PUBLIC_BUILD_SHA}`} | ||
> | ||
{process.env.NEXT_PUBLIC_BUILD_SHA}  | ||
<ExternalLink /> | ||
</Link> | ||
</p> | ||
<p> | ||
Build ID:{" "} | ||
<Link | ||
rel="noopener noreferrer" | ||
target="_blank" | ||
className="hocus:underline hocus:decoration-solid hocus:underline-offset-1" | ||
href={`https://github.com/sgoudham/website/actions/runs/${process.env.NEXT_PUBLIC_BUILD_ID}`} | ||
> | ||
{process.env.NEXT_PUBLIC_BUILD_ID}  | ||
<ExternalLink /> | ||
</Link> | ||
</p> | ||
<p>Build Num: #{process.env.NEXT_PUBLIC_BUILD_NUM}</p> | ||
</div> | ||
); | ||
}; | ||
|
||
const SocialMediaRow = () => { | ||
return ( | ||
<div className="flex gap-3 items-center"> | ||
<a | ||
className="group focus:ring-2 focus:ring-blue ring-offset-0" | ||
aria-label="Follow Me On GitHub" | ||
href="https://github.com/sgoudham" | ||
> | ||
<GitHub /> | ||
</a> | ||
<a | ||
className="group focus:ring-2 focus:ring-blue ring-offset-0" | ||
aria-label="Visit My Gitea Instance" | ||
href="https://gitea.goudham.com" | ||
> | ||
<Gitea /> | ||
</a> | ||
<a | ||
className="group focus:ring-2 focus:ring-blue ring-offset-0" | ||
aria-label="Follow Me On LinkedIn" | ||
href="https://linkedin.com/in/sgoudham" | ||
> | ||
<LinkedIn /> | ||
</a> | ||
<a | ||
className="group focus:ring-2 focus:ring-blue ring-offset-0" | ||
aria-label="Follow Me On Twitter" | ||
href="https://twitter.com/RealGoudham" | ||
> | ||
<Twitter /> | ||
</a> | ||
<a | ||
className="group focus:ring-2 focus:ring-blue ring-offset-0" | ||
aria-label="Follow Me On Instagram" | ||
href="https://instagram.com/sgoudham" | ||
> | ||
<Instagram /> | ||
</a> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Wave } from "./icons/Wave"; | ||
import { H1 } from "./utils/Titles"; | ||
|
||
export const Header = () => { | ||
return ( | ||
<H1> | ||
Hiya{" "} | ||
<div className="inline-block motion-safe:animate-waving-hand"> | ||
<Wave /> | ||
</div> | ||
, I'm Goudham | ||
</H1> | ||
); | ||
}; |
Oops, something went wrong.