Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to json resume & nextjs #58

Merged
merged 16 commits into from
Feb 3, 2024
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
28 changes: 0 additions & 28 deletions .eslintrc.js

This file was deleted.

3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
84 changes: 42 additions & 42 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
name: test, build and deploy site
on: [push]
jobs:
cypress-run:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: run e2e tests
uses: cypress-io/github-action@v5
with:
start: npm run ci:e2e
env:
CYPRESS_baseUrl: http://localhost:8080/
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: ./cypress/videos/
build:
needs: cypress-run
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- name: setup node
uses: actions/setup-node@v3
with:
node-version: '18.x'
cache: 'npm'
- name: build for static hosting
run: |
npm install
npm run docs:build
touch docs/.vitepress/dist/.nojekyll # https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/
- name: deploy the site
uses: crazy-max/ghaction-github-pages@v2
with:
build_dir: docs/.vitepress/dist/
fqdn: ${{ secrets.SITE_FQDN }}
env:
GH_PAT: ${{ secrets.DEPLOYMENT_PAT }}
# name: test, build and deploy site
# on: [push]
# jobs:
# cypress-run:
# runs-on: ubuntu-latest
# steps:
# - name: checkout
# uses: actions/checkout@v3
# - name: run e2e tests
# uses: cypress-io/github-action@v5
# with:
# start: npm run ci:e2e
# env:
# CYPRESS_baseUrl: http://localhost:8080/
# - uses: actions/upload-artifact@v3
# if: failure()
# with:
# name: cypress-screenshots
# path: ./cypress/videos/
# build:
# needs: cypress-run
# runs-on: ubuntu-latest
# if: github.ref == 'refs/heads/main'
# steps:
# - uses: actions/checkout@v3
# - name: setup node
# uses: actions/setup-node@v3
# with:
# node-version: '18.x'
# cache: 'npm'
# - name: build for static hosting
# run: |
# npm install
# npm run docs:build
# touch docs/.vitepress/dist/.nojekyll # https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/
# - name: deploy the site
# uses: crazy-max/ghaction-github-pages@v2
# with:
# build_dir: docs/.vitepress/dist/
# fqdn: ${{ secrets.SITE_FQDN }}
# env:
# GH_PAT: ${{ secrets.DEPLOYMENT_PAT }}
56 changes: 31 additions & 25 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,20 +1,39 @@
.DS_Store
node_modules
/dist
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

/tests/e2e/videos/
/tests/e2e/screenshots/
# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# local env files
.env.local
.env.*.local
# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# Log files
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts

# Editor directories and files
.idea
Expand All @@ -25,24 +44,11 @@ pnpm-debug.log*
*.sln
*.sw?

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# cypress
cypress/videos/

# latex build output
public/*.aux
public/*.out
public/*.log

# python
__pycache__


# vite build
docs/.vitepress/dist/
docs/.vitepress/cache/
# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# cypress
cypress/videos
Expand Down
29 changes: 29 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "vuejs: chrome",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}/src",
"breakOnLoad": true,
"sourceMapPathOverrides": {
"webpack:///src/*": "${webRoot}/*"
}
},
{
"type": "firefox",
"request": "launch",
"name": "vuejs: firefox",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}/src",
"pathMappings": [
{
"url": "webpack:///src/",
"path": "${webRoot}/"
}
]
}
]
}
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
93 changes: 34 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,80 +1,55 @@
# clintp.xyz - my bio site  ![test, build and deploy site](https://github.com/yuhonas/clintp.xyz/workflows/test,%20build%20and%20deploy%20site/badge.svg)

![Site Preview](./gh-site-preview.avif)
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started

This is a simple one page bio site that uses [vitepress](https://vitepress.dev/) with some basic CI/CD using [github actions](./.github/workflows/ci.yml) and a resume built using [latex](https://www.latex-project.org/)

### Prerequisites

### Site

* Node.js 18.x
First, run the development server:

### Installing

Install all our dependencies

```
$ npm install
```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```

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

To run a local web server for development
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.

```
$ npm run docs:dev
```
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.

## Running the tests
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.

### End-to-end tests
```
npm run ci:e2e
```
## Learn More

## Building the site
To learn more about Next.js, take a look at the following resources:

To build a static website for hosting

```
npm run docs:build
```
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

## Deployment
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

This site is automatically built and deployed by [github actions](https://github.com/actions) to [Github Pages](https://pages.github.com/)
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.

## Building the resume

My resume is built using [latex](https://www.latex-project.org/)

![picture of latex envy](./gh-latexenvy.png)

### Dependencies

You will need [ basictex ](https://tug.org/mactex/morepackages.html) installed in order to produce a pdf
or (what ever format you want)

Install basictex using homebrew

```
$ brew install basictex
## Top repos
```bash
curl -L \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/users/yuhonas/repos | jq '[sort_by(.stargazers_count) | reverse | limit(4; .[])]'
```

The following packages are utilised in the latex document and will also need to be installed via latex's package manager
## TODO
Add timeline - https://matplotlib.org/stable/gallery/lines_bars_and_markers/timeline.html

```
$ tlmgr install moresize raleway ly1 fontawesome
```

To export it to pdf

```
$ npm resume:export
```
## Links
* https://github.com/gauravghongde/social-icons
* https://www.svgrepo.com/svg/342086/open-source-initiative
Loading