Skip to content

Commit

Permalink
CI + despliegue en GitHub pages
Browse files Browse the repository at this point in the history
  • Loading branch information
JavierGelatti committed Nov 22, 2024
1 parent 4ae94f5 commit 323ad5e
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Deploy

on: [push]

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

deploy:
needs: build
if: github.ref == 'refs/heads/main'

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
3 changes: 3 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default {
base: "/self-js/"
}

0 comments on commit 323ad5e

Please sign in to comment.