This commit is contained in:
parent
ee44847974
commit
f33dc130b8
9 changed files with 203 additions and 14 deletions
35
.github/workflows/deploy.yml
vendored
Normal file
35
.github/workflows/deploy.yml
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
name: Docker Deploy
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Login to Container Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ${{ secrets.REPO_HOST }}
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.DEPLOY_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: |
|
||||
${{ secrets.REPO_HOST }}/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ github.sha }}
|
||||
${{ secrets.REPO_HOST }}/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest
|
30
Dockerfile
Normal file
30
Dockerfile
Normal file
|
@ -0,0 +1,30 @@
|
|||
FROM denoland/deno:alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY deno.json import_map.json ./
|
||||
COPY dev.ts main.ts .env* ./
|
||||
|
||||
COPY components/ ./components/
|
||||
COPY islands/ ./islands/
|
||||
COPY lib/ ./lib/
|
||||
COPY posts/ ./posts/
|
||||
COPY routes/ ./routes/
|
||||
COPY static/ ./static/
|
||||
COPY utils/ ./utils/
|
||||
|
||||
RUN deno cache main.ts
|
||||
|
||||
FROM denoland/deno:alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /deno-dir/ /deno-dir/
|
||||
COPY --from=builder /app/ /app/
|
||||
|
||||
ENV DENO_DEPLOYMENT=production
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
# Run the server
|
||||
CMD ["run", "-A", "main.ts"]
|
15
components/HomeButtonLinks.tsx
Normal file
15
components/HomeButtonLinks.tsx
Normal file
|
@ -0,0 +1,15 @@
|
|||
export default function HomeButtonLinks() {
|
||||
return (
|
||||
<div class="flex flex-row gap-4 text-3xl">
|
||||
<a
|
||||
href="/files/Atridad_Lahiji_Resume_Public.pdf"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
aria-label="React"
|
||||
class="btn btn-dash btn-primary"
|
||||
>
|
||||
Resumé
|
||||
</a>
|
||||
</div>
|
||||
);
|
||||
}
|
|
@ -4,10 +4,41 @@ import { SiBluesky, SiForgejo, SiRss } from "@preact-icons/si";
|
|||
export default function SocialLinks() {
|
||||
return (
|
||||
<div class="flex flex-row gap-4 text-3xl">
|
||||
<LuMail class="hover:text-primary" />
|
||||
<SiRss class="hover:text-primary" />
|
||||
<SiForgejo class="hover:text-primary" />
|
||||
<SiBluesky class="hover:text-primary" />
|
||||
<a
|
||||
href="mailto:me@atri.dad"
|
||||
aria-label="Email me"
|
||||
class="hover:text-primary transition-colors"
|
||||
>
|
||||
<LuMail />
|
||||
</a>
|
||||
|
||||
<a
|
||||
href="/feed"
|
||||
aria-label="RSS Feed"
|
||||
class="hover:text-primary transition-colors"
|
||||
>
|
||||
<SiRss />
|
||||
</a>
|
||||
|
||||
<a
|
||||
href="https://git.atri.dad/atridad"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
aria-label="Forgejo (Git)"
|
||||
class="hover:text-primary transition-colors"
|
||||
>
|
||||
<SiForgejo />
|
||||
</a>
|
||||
|
||||
<a
|
||||
href="https://bsky.app/profile/atri.dad"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
aria-label="Bluesky Profile"
|
||||
class="hover:text-primary transition-colors"
|
||||
>
|
||||
<SiBluesky />
|
||||
</a>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -11,13 +11,75 @@ import {
|
|||
export default function TechLinks() {
|
||||
return (
|
||||
<div class="flex flex-row gap-4 text-3xl">
|
||||
<SiReact class="hover:text-primary" />
|
||||
<SiTypescript class="hover:text-primary" />
|
||||
<SiDeno class="hover:text-primary" />
|
||||
<SiGo class="hover:text-primary" />
|
||||
<SiPostgresql class="hover:text-primary" />
|
||||
<SiRedis class="hover:text-primary" />
|
||||
<SiDocker class="hover:text-primary" />
|
||||
<a
|
||||
href="https://react.dev/"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
aria-label="React"
|
||||
class="hover:text-primary transition-colors"
|
||||
>
|
||||
<SiReact />
|
||||
</a>
|
||||
|
||||
<a
|
||||
href="https://www.typescriptlang.org/"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
aria-label="TypeScript"
|
||||
class="hover:text-primary transition-colors"
|
||||
>
|
||||
<SiTypescript />
|
||||
</a>
|
||||
|
||||
<a
|
||||
href="https://deno.com/"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
aria-label="Deno"
|
||||
class="hover:text-primary transition-colors"
|
||||
>
|
||||
<SiDeno />
|
||||
</a>
|
||||
|
||||
<a
|
||||
href="https://go.dev/"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
aria-label="Go"
|
||||
class="hover:text-primary transition-colors"
|
||||
>
|
||||
<SiGo />
|
||||
</a>
|
||||
|
||||
<a
|
||||
href="https://www.postgresql.org/"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
aria-label="PostgreSQL"
|
||||
class="hover:text-primary transition-colors"
|
||||
>
|
||||
<SiPostgresql />
|
||||
</a>
|
||||
|
||||
<a
|
||||
href="https://redis.io/"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
aria-label="Redis"
|
||||
class="hover:text-primary transition-colors"
|
||||
>
|
||||
<SiRedis />
|
||||
</a>
|
||||
|
||||
<a
|
||||
href="https://www.docker.com/"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
aria-label="Docker"
|
||||
class="hover:text-primary transition-colors"
|
||||
>
|
||||
<SiDocker />
|
||||
</a>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
13
docker-compose.yml
Normal file
13
docker-compose.yml
Normal file
|
@ -0,0 +1,13 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
app:
|
||||
image: ${IMAGE:-ghcr.io/yourusername/your-fresh-project:latest}
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- DENO_DEPLOYMENT=production
|
||||
ports:
|
||||
- "3000:8000"
|
||||
# If you need to persist any data
|
||||
volumes:
|
||||
- ./data:/app/data
|
|
@ -1,7 +1,7 @@
|
|||
// routes/_layout.tsx
|
||||
import { PageProps } from "$fresh/server.ts";
|
||||
import { Head } from "$fresh/runtime.ts";
|
||||
import { LuBook, LuBriefcase, LuHouse } from "@preact-icons/lu";
|
||||
import { LuCodeXml, LuHouse, LuNotebookPen } from "@preact-icons/lu";
|
||||
|
||||
export default function Layout({ Component, url }: PageProps) {
|
||||
const currentPath = url.pathname;
|
||||
|
@ -34,7 +34,7 @@ export default function Layout({ Component, url }: PageProps) {
|
|||
class={currentPath.startsWith("/posts") ? "menu-active" : ""}
|
||||
>
|
||||
<div class="tooltip" data-tip="Posts">
|
||||
<LuBook class="text-xl" />
|
||||
<LuNotebookPen class="text-xl" />
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
@ -44,7 +44,7 @@ export default function Layout({ Component, url }: PageProps) {
|
|||
class={currentPath.startsWith("/projects") ? "menu-active" : ""}
|
||||
>
|
||||
<div class="tooltip" data-tip="Projects">
|
||||
<LuBriefcase class="text-xl" />
|
||||
<LuCodeXml class="text-xl" />
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import HomeButtonLinks from "../components/HomeButtonLinks.tsx";
|
||||
import SocialLinks from "../components/SocialLinks.tsx";
|
||||
import TechLinks from "../components/TechLinks.tsx";
|
||||
|
||||
|
@ -22,6 +23,8 @@ export default function Home() {
|
|||
<h2 class="text-2xl font-bold">Stuff I Use:</h2>
|
||||
|
||||
<TechLinks />
|
||||
|
||||
<HomeButtonLinks />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
BIN
static/files/Atridad_Lahiji_Resume_Public.pdf
Normal file
BIN
static/files/Atridad_Lahiji_Resume_Public.pdf
Normal file
Binary file not shown.
Loading…
Add table
Reference in a new issue