Skip to content

Commit

Permalink
github pages ci/cd
Browse files Browse the repository at this point in the history
  • Loading branch information
ArielFalcon committed Jan 8, 2025
1 parent 9ad33ee commit 624bdbb
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions .github/workflows/astro-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Deploy Astro to GitHub Pages
on:
push:
branches:
- main # Cambia "main" si tu rama principal tiene otro nombre
- main

permissions:
contents: read
Expand All @@ -14,33 +14,25 @@ jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
# 1. Configurar el repositorio
# 1. Config repository
- name: Checkout code
uses: actions/checkout@v3

# 2. Configurar Node.js y pnpm
# 2. Config Node.js
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18 # Usa la versión de Node.js que prefieras
cache: 'pnpm' # Cambia 'npm' por 'pnpm'
node-version: 22
cache: 'npm'

# 3. Instalar pnpm
- name: Install pnpm
run: npm install -g pnpm

# 4. Instalar dependencias usando pnpm
- name: Install dependencies
run: pnpm install

# 3. Instalar dependencias
# 3. Install dependencies
- name: Install dependencies
run: npm install

# 4. Compilar el proyecto Astro
# 4. Compile Astro
- name: Build Astro
run: npm run build

# 5. Deploy en GitHub Pages
# 5. Deploy
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v1

0 comments on commit 624bdbb

Please sign in to comment.