Skip to content

Commit

Permalink
Refactor: New design and moving to astro (#32)
Browse files Browse the repository at this point in the history
* move next app to  folder

* 🚚 move

* πŸŽ‰ initialize astro folder

* 🚧 wip

* 🍱 add custom favicon & use correct dark color for dark mode

* πŸ’„ header & footer done

* πŸ’„ some progress

* 🚚 move `astro` folder  in the root

* 🚧 some changes

* πŸ’š fix CI build

* βž• add `sharp` dependency for optimizing images

* πŸ’„ some more changes

* 🏷️ fix types

* πŸ’¬ add zaneops link

* πŸ“ update README

* πŸ“ update README

* πŸ“ update README

* πŸ§‘β€πŸ’» add view transition component

* ✨ 404 page

* 🚧 some more progress

* πŸ’„ reduce bottom margin on footer

* 🚧 wip

* 🚧 wip

* πŸ’„ responsive

* ♻️ some more changes

* ♻️ defaults to creator & maintainer

* 🍱 procurato experience done

* ✨ done ??

* πŸ’„ group job company & title

* πŸ’„ make section titles bigger

* πŸ”₯ remove `_next` app

* πŸ’„ make max-width bigger

* ♻️ add docker ignore

* ♻️ add `.astro` to ignored directories
  • Loading branch information
Fredkiss3 authored Sep 24, 2024
1 parent f10137b commit c99f0e8
Show file tree
Hide file tree
Showing 132 changed files with 3,615 additions and 6,830 deletions.
4 changes: 3 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
Expand All @@ -8,9 +9,10 @@
# testing
/coverage

# next.js
# astro
/.next/
/out/
.astro/

# production
/build
Expand Down
1 change: 0 additions & 1 deletion .env.example

This file was deleted.

3 changes: 0 additions & 3 deletions .eslintrc.json

This file was deleted.

54 changes: 54 additions & 0 deletions .github/workflows/build-push-image-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Build and Push Image in DEV
on:
pull_request:
workflow_dispatch:

jobs:
build-push-docs:
name: Build and Push Website
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
attestations: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Cache pnpm dependencies
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.OS }}-pnpm-cache-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.OS }}-pnpm-cache-
- name: Build with node
run: |
npm install -g pnpm@8
pnpm install --frozen-lockfile
pnpm run build
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.CONTAINER_REGISTRY_PAT }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: ghcr.io/fredkiss3/fredkiss-dev:pr-${{ github.event.pull_request.number }},ghcr.io/fredkiss3/fredkiss-dev:${{ github.sha }}
cache-from: |
type=registry,ref=ghcr.io/fredkiss3/fredkiss-dev:pr-${{ github.event.pull_request.number }}
type=registry,ref=ghcr.io/fredkiss3/fredkiss-dev:latest
cache-to: type=inline
55 changes: 55 additions & 0 deletions .github/workflows/build-push-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build and Push production Image
on:
push:
branches:
- main
workflow_dispatch:

jobs:
build-push-docs:
name: Build and Push Website
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
attestations: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Cache pnpm dependencies
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.OS }}-pnpm-cache-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.OS }}-pnpm-cache-
- name: Build with node
run: |
npm install -g pnpm@8
pnpm install --frozen-lockfile
pnpm run build
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.CONTAINER_REGISTRY_PAT }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: ghcr.io/fredkiss3/fredkiss-dev:latest,ghcr.io/fredkiss3/fredkiss-dev:${{ github.sha }}
cache-from: |
type=registry,ref=ghcr.io/fredkiss3/fredkiss-dev:latest
cache-to: type=inline
45 changes: 15 additions & 30 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,39 +1,24 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# build output
dist/
# generated types
.astro/

# dependencies
/node_modules
/.pnp
.pnp.js
node_modules/

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
pnpm-debug.log*


# local env files
.env*.local
# environment variables
.env
.env.production

# vercel
.vercel
# macOS-specific files
.DS_Store

# typescript
*.tsbuildinfo
/.idea
/.vscode
/.contentlayer
other
# jetbrains setting folder
.idea/
17 changes: 0 additions & 17 deletions .prettierignore

This file was deleted.

10 changes: 9 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,13 @@
"arrowParens": "avoid",
"jsxBracketSameLine": true,
"pluginSearchDirs": ["."],
"plugins": ["prettier-plugin-tailwindcss"]
"plugins": ["prettier-plugin-astro"],
"overrides": [
{
"files": "*.astro",
"options": {
"parser": "astro"
}
}
]
}
4 changes: 4 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"recommendations": ["astro-build.astro-vscode"],
"unwantedRecommendations": []
}
11 changes: 11 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
"name": "Development server",
"request": "launch",
"type": "node-terminal"
}
]
}
20 changes: 20 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
},
"editor.defaultFormatter": "biomejs.biome",
"typescript.preferences.importModuleSpecifier": "non-relative",
"typescript.tsdk": "node_modules/typescript/lib",
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[astro]": {
"editor.defaultFormatter": "astro-build.astro-vscode"
}
}
19 changes: 19 additions & 0 deletions Caddyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
:80 {
# Set the root directory for static files
root * /var/www/html
file_server

@assets {
path_regexp assets \.(css|js|png|jpg|jpeg|gif|svg|woff|woff2|eot|ttf|otf)$
}

header @assets Cache-Control "public, max-age=31536000, immutable"

handle_errors {
@404 {
expression {http.error.status_code} == 404
}
rewrite @404 ./404.html
file_server
}
}
22 changes: 5 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
# Build and compile the webapp
FROM node:16-alpine
# Webapp based on caddy
FROM caddy:2.8-alpine

WORKDIR /app
WORKDIR /var/www/html

RUN apk add --update curl && rm -rf /var/cache/apk/*
RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm@6

COPY package.json ./

RUN pnpm install --shamefully-hoist

COPY . .

RUN pnpm run build

RUN pnpm run telemetry:disable

CMD ["pnpm", "run", "start"]
COPY ./dist/ ./
COPY ./Caddyfile /etc/caddy/Caddyfile
23 changes: 9 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
<p align="center">
<a href="https://fredkiss.dev">
<img alt="Sreenshot portfolio" src="https://user-images.githubusercontent.com/38298743/231404339-32480393-3629-499f-95a9-b8f64c706357.png" width="100%" />
</a>
</p>

# My portfolio

This is my portfolio.
This is my portfolio, made with [astro](https://astro.build) and deployed on [ZaneOps](https://github.com/zane-ops/zane-ops).

# Requirements

- Node >= v16.6.2
- npm or [PNPM](https://pnpm.io/installation) >= v6.22.2
- [PNPM](https://pnpm.io/installation) >= v8.15.9


## πŸš€ How to work on the project ?
Expand All @@ -25,20 +19,21 @@ This is my portfolio.
2. **Then, Install the dependencies :**

```bash
npm install
# or
pnpm install --shamefully-hoist
pnpm install --frozen-lockfile
```

3. **Then, Run the project :**

```bash
npm run dev
# or
pnpm run dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
Open [http://localhost:4321](http://localhost:4321) with your browser to see the result.

6. **Open the source code and start rocking ! 😎**



## πŸ™ Credits

- [Nexxel](https://github.com/nexxeln/nexxel.dev): for the design inspiration
13 changes: 0 additions & 13 deletions app/[locale]/globals.css

This file was deleted.

Loading

0 comments on commit c99f0e8

Please sign in to comment.