Skip to content

Commit

Permalink
create site with Next & deploy with GA
Browse files Browse the repository at this point in the history
Update README.md
Update README-en.md
  • Loading branch information
sergiolms committed Jun 18, 2024
1 parent ff7c05e commit 5a1b0db
Show file tree
Hide file tree
Showing 23 changed files with 6,416 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/deploy-page.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
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:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Make build
run: |
npm i --prefix ./site
npm run build --prefix ./site
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: './site/out'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
6 changes: 6 additions & 0 deletions README-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

SmartBite is an AI tool that identifies food dishes in photos, providing details about ingredients, allergens, macronutrients, and calories. Improve your health and well-being with conscious and balanced eating. 🍽️🌿

<div align="center">
<img src="https://github.com/sergiolms/smartbite/assets/86774052/897885e8-efca-400e-a679-73b6ab3f828b" alt="SmartBite Showcase gif" />
<br/>
<i>If your prefer it, <a href="https://github.com/sergiolms/smartbite/assets/86774052/36561ee5-0d07-437d-bf9c-9ebc00980083" target="_blank">here</a> is the video</i>
</div>

<!-- TODO: añadir el artículo de Medium aquí una vez se publique -->

## 🚀 The Project
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

SmartBite es una herramienta de IA que identifica platos de comida en fotos, proporcionando detalles sobre ingredientes, alérgenos, macronutrientes y calorías. Mejora tu salud y bienestar con una alimentación consciente y equilibrada. 🍽️🌿

<div align="center">
<img src="https://github.com/sergiolms/smartbite/assets/86774052/897885e8-efca-400e-a679-73b6ab3f828b" alt="SmartBite Showcase gif" />
<br/>
<i>Si lo prefieres, <a href="https://github.com/sergiolms/smartbite/assets/86774052/36561ee5-0d07-437d-bf9c-9ebc00980083" target="_blank">aquí</a> lo tienes en vídeo</i>
</div>


<!-- TODO: añadir el artículo de Medium aquí una vez se publique -->

## 🚀 El proyecto
Expand Down
3 changes: 3 additions & 0 deletions site/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
36 changes: 36 additions & 0 deletions site/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

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

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
36 changes: 36 additions & 0 deletions site/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
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

First, run the development server:

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

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

You can start editing the page by modifying `app/page.js`. The page auto-updates as you edit the file.

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

## Learn More

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

- [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.

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

## Deploy on Vercel

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.
7 changes: 7 additions & 0 deletions site/jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"compilerOptions": {
"paths": {
"@/*": ["./src/pages/*"]
}
}
}
26 changes: 26 additions & 0 deletions site/next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export',
reactStrictMode: true,
webpack(config, { isServer }) {
if (!isServer) {
config.resolve = {
...config.resolve,
fallback: {
net: false,
dns: false,
tls: false,
assert: false,
path: false,
fs: false,
events: false,
process: false
}
};
}

return config;
}
};

export default nextConfig;
Loading

0 comments on commit 5a1b0db

Please sign in to comment.