From 6fd9f0e604e5844d46a81fb60466ca4317009e32 Mon Sep 17 00:00:00 2001 From: Facundo Javier Gelatti Date: Fri, 22 Nov 2024 18:45:52 -0300 Subject: [PATCH] CI + despliegue en GitHub pages --- .github/workflows/deploy.yml | 39 ++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..af22bcb --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,39 @@ +name: Deploy + +on: [push] + +permissions: + contents: read + pages: write + +jobs: + build: + name: Build & Test + runs-on: ubuntu-latest + + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + cache: npm + + - name: Install dependencies + run: npm ci + + - name: Build project + run: npm run build + + - name: Upload pages artifact + if: github.ref == 'refs/heads/main' + uses: actions/upload-pages-artifact@v3 + with: + path: ./dist + + - name: Deploy to GitHub Pages + if: github.ref == 'refs/heads/main' + id: deployment + uses: actions/deploy-pages@v4