Skip to content

Commit 02eded0

Browse files
committed
fix: 🐛 deploy
1 parent cd0e983 commit 02eded0

File tree

3 files changed

+49
-16
lines changed

3 files changed

+49
-16
lines changed

.github/workflows/deploy.yml

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ name: Deploy Next.js site to GitHub Pages
22

33
on:
44
push:
5-
branches: ["main"]
5+
branches:
6+
- "main"
67
workflow_dispatch:
78

89
permissions:
@@ -18,26 +19,43 @@ jobs:
1819
build:
1920
runs-on: ubuntu-latest
2021
steps:
21-
- uses: actions/checkout@v4
22-
23-
- name: Setup Node
22+
# Checkout the code
23+
- name: Checkout code
24+
uses: actions/checkout@v4
25+
26+
# Setup Node.js environment
27+
- name: Setup Node.js
2428
uses: actions/setup-node@v4
2529
with:
2630
node-version: "20"
27-
cache: 'npm'
28-
31+
32+
# Cache npm dependencies to speed up builds
33+
- name: Cache npm dependencies
34+
uses: actions/cache@v3
35+
with:
36+
path: ~/.npm
37+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
38+
restore-keys: |
39+
${{ runner.os }}-node-
40+
41+
# Install dependencies
2942
- name: Install dependencies
3043
run: |
3144
npm ci
32-
npm install sharp # Importante para imágenes
45+
npm install sharp # Important for images optimization
3346
34-
- name: Setup Pages
35-
uses: actions/configure-pages@v4
36-
47+
# Build the project with Next.js
3748
- name: Build with Next.js
3849
run: |
3950
npm run build
4051
52+
# Ensure 'out' directory is created and set '.nojekyll' to avoid conflicts
53+
- name: Prepare output directory
54+
run: |
55+
mkdir -p out
56+
touch out/.nojekyll
57+
58+
# Upload the built site as an artifact
4159
- name: Upload artifact
4260
uses: actions/upload-pages-artifact@v3
4361
with:
@@ -50,6 +68,7 @@ jobs:
5068
runs-on: ubuntu-latest
5169
needs: build
5270
steps:
71+
# Deploy to GitHub Pages
5372
- name: Deploy to GitHub Pages
5473
id: deployment
5574
uses: actions/deploy-pages@v4

next.config.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import type { NextConfig } from "next";
22

33
const nextConfig: NextConfig = {
4-
reactStrictMode: true,
54
images: {
65
unoptimized: true,
76
},
8-
basePath: '/seminar-visualds.github.io',
7+
distDir: 'out',
98
};
109

1110
export default nextConfig;

tsconfig.json

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
22
"compilerOptions": {
33
"target": "ES2017",
4-
"lib": ["dom", "dom.iterable", "esnext"],
4+
"lib": [
5+
"dom",
6+
"dom.iterable",
7+
"esnext"
8+
],
59
"allowJs": true,
610
"skipLibCheck": true,
711
"strict": true,
@@ -19,9 +23,20 @@
1923
}
2024
],
2125
"paths": {
22-
"@/*": ["./*"]
26+
"@/*": [
27+
"./*"
28+
]
2329
}
2430
},
25-
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
26-
"exclude": ["node_modules"]
31+
"include": [
32+
"**/*.ts",
33+
"**/*.tsx",
34+
".next/types/**/*.ts",
35+
"next-env.d.ts",
36+
"salida/types/**/*.ts",
37+
"out/types/**/*.ts"
38+
],
39+
"exclude": [
40+
"node_modules"
41+
]
2742
}

0 commit comments

Comments
 (0)