Skip to content

Commit a455995

Browse files
committed
feature(GH action): deploy to gh-pages
1 parent 4e91297 commit a455995

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main # o master, dependiendo de tu rama principal
7+
workflow_dispatch: # Permite ejecutar el workflow manualmente
8+
9+
permissions:
10+
contents: write # Necesario para hacer push a gh-pages
11+
12+
jobs:
13+
build-and-deploy:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout 🛎️
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: '20'
24+
cache: 'npm'
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
- name: Build
30+
run: npm run build
31+
32+
- name: Deploy 🚀
33+
uses: JamesIves/github-pages-deploy-action@v4
34+
with:
35+
folder: dist # La carpeta que contiene los archivos a desplegar
36+
branch: gh-pages # La rama a la que se desplegará
37+
clean: true # Elimina archivos antiguos antes de desplegar

0 commit comments

Comments
 (0)