-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
004f7f3
commit e7ba686
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Deploy to GitHub Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- main # Escucha cambios en la rama principal | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest # Elige un entorno Ubuntu | ||
|
||
steps: | ||
# Paso 1: Clonar el repositorio | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
|
||
# Paso 2: Configurar Python | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.12 # Elige la versión de Python | ||
|
||
# Paso 3: Instalar dependencias de Python | ||
- name: Install Dependencies | ||
run: | | ||
pip install -r src/requirements.txt | ||
# Paso 4: Generar el sitio | ||
- name: Generate Site | ||
run: | | ||
python src/sitebuilder.py | ||
# Paso 5: Desplegar a GitHub Pages | ||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./dist # Carpeta donde está el sitio generado |