DEV Community

Cover image for github action para deploy de app vuejs 3
Horacio Degiorgi
Horacio Degiorgi

Posted on

3 2

github action para deploy de app vuejs 3

El push en un repositorio github de una aplicación vuejs puede perfectamente disparar una acciòn que produzca un build y deje el directorio listo para descargar y "deployar" en otro servidor.

Esta aplicación simple de buscador utilizando una api de #vufind es "compilada" por github en forma automática cuando se hace un push en la rama main.

Con la siguiente "action" de github se realiza un build en base a una maquina virtual ubuntu y se utilizan tres actions más:

Todo esto en forma automática y con un log qque permite ver los posibles errores.

name: DEPLOY TO cdi

on:
  push:
    branches:
      - main

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node: [ 18 ]
    name: Node ${{ matrix.node }} sample
    steps:
      - uses: actions/checkout@v3
      - name: Setup node
        uses: actions/setup-node@v3
        with:
          node-version: ${{ matrix.node }}
      - run: npm i @vue/cli-service
      - run: npm run build
      - uses: actions/upload-artifact@v3
        with:
           name: my-dist
           path: cdi # or path/to/artifact      

Enter fullscreen mode Exit fullscreen mode

Github repo

Image description

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more