Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .dockerignore

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build

on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Setup node
uses: actions/setup-node@v4
with:
cache: pnpm
node-version: 20

- name: Install dependencies
run: pnpm i --frozen-lockfile

- name: Build Website
run: pnpm build
54 changes: 54 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Deploy

on:
workflow_dispatch:
push:
branches: [main]

permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Setup node
uses: actions/setup-node@v4
with:
cache: pnpm
node-version: 20
- name: Setup Pages
uses: actions/configure-pages@v5
with:
static_site_generator: next
- name: Install dependencies
run: pnpm i --frozen-lockfile
- name: Build with Next.js
run: pnpm build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./out

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
40 changes: 0 additions & 40 deletions .github/workflows/preview.yml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/release.yml

This file was deleted.

934 changes: 0 additions & 934 deletions .yarn/releases/yarn-4.5.1.cjs

This file was deleted.

7 changes: 0 additions & 7 deletions .yarnrc.yml

This file was deleted.

50 changes: 0 additions & 50 deletions Dockerfile

This file was deleted.

52 changes: 5 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,56 +9,14 @@
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/bbc6efd2096b8cfa82d00f8ad1099b1b2b34fc8f/assets/misc/transparent.png" height="30" width="0px"/>
</h3>

Believe it or not, this is what I'd consider to be my first "project" involving modern front-end technologies. I don't
have much experience with the tech stack that I've chosen here or even front-end development in general.

I hope this maybe, just maybe inspires someone else to just throw themselves into a project and have some fun along the
way :D

Also, _technically_, this is a **work-in-progress** but shh...

## Dependencies

- NodeJS 20
- Yarn
- **(Optional)** Container Orchestration Tool (e.g. Docker)

If you're a ~~filthy~~ [Nix/NixOS](https://nixos.org/) user, you can take advantage of the [flake.nix](flake.nix) by
running `nix develop` to automatically get a shell with all the required dependencies.
This is always a **work-in-progress**.

## Building

1. Install the required dependencies via `yarn`

```shell
yarn install
```

2. Run the development server

```shell
yarn dev
```

If you're a containers type of person, you can instead run the server via the
provided [Dockerfile](Dockerfile):

```shell
yarn docker:preview # or yarn docker:release
```

## Deployment

This is mostly for me when I revisit this godforsaken project in 7 months having forgotten everything :P

This repository has 2 workflow files:

- **[preview.yml](.github/workflows/preview.yml)** - This workflow is triggered on every pushed commit to the main branch.
- The website is built and deployed to docker hub as `sgoudham/website:preview`
- My server automatically pulls the latest image from the `preview` tag and deploys it under `https://preview.goudham.com`.
- **[release.yml](.github/workflows/release.yml)** - This workflow is triggered on any pushed tag.
- The website is built and deployed to docker hub as `sgoudham/website:<tag>`.
- My server automatically pulls the latest tag `<tag>` and deploys it under `https://goudham.com`.
```
pnpm install
pnpm build # or pnpm dev
```

## Contributing

Expand Down
13 changes: 3 additions & 10 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,10 @@ export const metadata: Metadata = {
"Software Engineer at the BBC, Core Maintainer for Catppuccin. Ultimately trying to write code that I don't hate and take photos that I'm proud of.",
keywords: ["Next.js", "React", "Typescript", "Catppuccin", "Goudham"],
colorScheme: "light dark",
metadataBase: new URL(
process.env.NEXT_PUBLIC_IS_PREVIEW
? "https://preview.goudham.com"
: "https://goudham.com"
),
metadataBase: new URL("https://goudham.com"),
openGraph: {
url: process.env.NEXT_PUBLIC_IS_PREVIEW
? "https://preview.goudham.com"
: "https://goudham.com",
title: `Goudham Suresh${process.env.NEXT_PUBLIC_IS_PREVIEW ? " (Preview)" : ""
}`,
url: "https://goudham.com",
title: `Goudham Suresh`,
description:
"Software Engineer at the BBC, Core Maintainer for Catppuccin. Ultimately trying to write code that I don't hate and take photos that I'm proud of.",
locale: "en_GB",
Expand Down
2 changes: 1 addition & 1 deletion app/robots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ export default function robots(): MetadataRoute.Robots {
allow: '/',
disallow: '/private/',
},
sitemap: process.env.NEXT_PUBLIC_IS_PREVIEW ? 'https://preview.goudham.com/sitemap.xml' : 'https://goudham.com/sitemap.xml',
sitemap: 'https://goudham.com/sitemap.xml',
}
}
4 changes: 1 addition & 3 deletions app/sitemap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ import { MetadataRoute } from "next";
export default function sitemap(): MetadataRoute.Sitemap {
return ["goudham.com"].map((url) => {
return {
url: process.env.NEXT_PUBLIC_IS_PREVIEW
? `https://preview.${url}`
: `https://${url}`,
url: `https://${url}`,
lastModified: new Date(),
};
});
Expand Down
60 changes: 0 additions & 60 deletions flake.lock

This file was deleted.

Loading